﻿/* Ürün listesi filtreleri (Urunler.aspx .lf).
   Bar: Filtreler (seçim sayısı, gönderim tarihi dahil) · Aynı Gün Teslimat · Sırala / Filtreyi Kapat. Gönderim tarihi panelin içinde ayrı bir grup.
   Panel bar ile ürünler arasında sayfa içinde açılır (ürünlerin üstüne binmez): solda gruplar, sağda seçenekler.
   Renk değişkenleri css/lilyana-menu.css (:root --lm-*) dosyasından gelir. */

.lf {
    --lf-line: #dfe3ea;
    --lf-blue: var(--lm-navy);
    margin: 6px 0 14px;
    font-family: inherit;
}

/* ---- Bar ---- */
.lf-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.lf-toggle,
.lf-sortbtn,
.lf-closebtn,
.lf-switch label {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    height: 46px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--lf-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lm-ink);
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.lf-toggle:hover,
.lf-sortbtn:hover,
.lf-closebtn:hover,
.lf-switch label:hover {
    border-color: var(--lm-navy);
}
.lf-toggle:focus-visible,
.lf-sortbtn:focus-visible,
.lf-closebtn:focus-visible {
    outline: 2px solid var(--lm-navy);
    outline-offset: 2px;
}
.lf-ico {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lf-toggle {
    min-width: 170px;
    justify-content: center;
    font-weight: 600;
}
/* Panel açıkken: düğme panelle birleşik görünür */
.lf-toggle.is-active {
    border-color: var(--lm-navy);
    background: var(--lm-navy);
    color: #fff;
}
.lf-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--lm-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.lf-toggle.is-active .lf-count {
    background: #fff;
    color: var(--lm-navy);
}
.lf-count[hidden],
.lf-sortbtn[hidden],
.lf-closebtn[hidden] {
    display: none;
}
.lf-sortbtn,
.lf-closebtn {
    margin-left: auto;
}
.lf-sortbtn b {
    font-weight: 600;
}
.lf-closebtn {
    font-weight: 600;
}

/* ---- Aynı Gün Teslimat anahtarı (sunucu CheckBox'ı; dokununca sayfa yenilenir) ---- */
.lf-switch {
    position: relative;
    flex: 0 0 auto;
}
.lf-switch__box {
    display: inline-flex;
}
.lf-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.lf-switch label {
    gap: 10px;
    padding-left: 12px;
}
.lf-switch label::before {
    content: "";
    flex: 0 0 auto;
    width: 36px;
    height: 22px;
    border-radius: 999px;
    background: #d4d9e2;
    transition: background-color .2s ease;
}
.lf-switch label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(20, 33, 61, .25);
    transition: transform .2s var(--lm-ease);
}
.lf-switch input:checked + label {
    border-color: var(--lm-navy);
    background: #eef1f7;
    color: var(--lm-navy);
}
.lf-switch input:checked + label::before {
    background: var(--lm-navy);
}
.lf-switch input:checked + label::after {
    transform: translateX(14px);
}
.lf-switch input:focus-visible + label {
    outline: 2px solid var(--lm-navy);
    outline-offset: 2px;
}
.lf-switch__hint {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    width: 240px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--lm-navy);
    color: #fff;
    font-size: 12.5px;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}
@media (hover: hover) {
    .lf-switch:hover .lf-switch__hint,
    .lf-switch:focus-within .lf-switch__hint {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

/* ---- Panel ---- */
.lf-panel {
    display: none;
    grid-template-columns: 300px minmax(0, 1fr);
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--lf-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px -18px rgba(20, 33, 61, .35);
}
.lf-panel.is-open {
    display: grid;
    animation: lf-in .2s var(--lm-ease);
}
@keyframes lf-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Sol: gruplar */
.lf-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-right: 1px solid var(--lf-line);
    background: #fff;
}
.lf-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 52px;
    margin: 0;
    padding: 0 22px 0 28px;
    border: 0;
    border-bottom: 1px solid #eef0f4;
    background: transparent;
    color: var(--lm-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.lf-nav__item:last-child {
    border-bottom: 0;
}
.lf-nav__item[hidden] {
    display: none;
}
.lf-nav__item:hover {
    background: #f6f7fa;
}
.lf-nav__item.is-active {
    background: #f3f4f7;
    color: var(--lm-navy);
    font-weight: 700;
}
.lf-nav__item.is-active::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--lm-navy);
}
.lf-nav__item:focus-visible {
    outline: 2px solid var(--lm-navy);
    outline-offset: -2px;
}
.lf-nav__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--lm-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.lf-nav__count[hidden] {
    display: none;
}

/* Sağ: seçenekler */
.lf-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px 28px 20px;
    background: #f7f8fa;
}
.lf-group {
    display: none;
    flex: 1 1 auto;
}
.lf-group.is-active {
    display: block;
}
.lf-tools {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}
.lf-search {
    position: relative;
    display: block;
    margin: 0;
}
.lf-search svg {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    fill: none;
    stroke: var(--lm-muted);
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}
.lf-search input {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 14px 0 42px;
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    background: #fff;
    color: var(--lm-ink);
    font: inherit;
    font-size: 14px;
    box-shadow: none;
}
.lf-search input:focus {
    border-color: var(--lm-navy);
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 33, 61, .1);
}
.lf-empty {
    margin: 4px 0 0;
    color: var(--lm-muted);
    font-size: 14px;
}

/* Onay kutuları: CheckBoxList <ul><li><input><label> ya da Flow (<span><input><label><br>) olabilir */
.lf-opts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 4px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.lf-opts > br {
    display: none;
}
.lf-opts li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}
.lf-opts li[hidden] {
    display: none;
}
.lf-opts input,
.lf-all input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.lf-opts label,
.lf-all label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 0;
    padding: 4px 0;
    color: var(--lm-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.lf-opts label::before,
.lf-all label::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 1.5px solid #9aa3b2;
    border-radius: 5px;
    background: #fff center / 13px no-repeat;
    transition: background-color .15s ease, border-color .15s ease;
}
.lf-opts label:hover::before,
.lf-all label:hover::before {
    border-color: var(--lm-navy);
}
.lf-opts input:checked + label,
.lf-all input:checked + label {
    color: var(--lm-navy);
    font-weight: 600;
}
.lf-opts input:checked + label::before,
.lf-all input:checked + label::before {
    border-color: var(--lm-navy);
    background-color: var(--lm-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.lf-all input:indeterminate + label::before {
    border-color: var(--lm-navy);
    background-color: var(--lm-navy);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
.lf-opts input:focus-visible + label::before,
.lf-all input:focus-visible + label::before {
    outline: 2px solid var(--lm-navy);
    outline-offset: 2px;
}
.lf-opts--radio label::before {
    border-radius: 50%;
}
.lf-opts--radio input:checked + label::before {
    background-image: none;
    box-shadow: inset 0 0 0 4px #fff;
}

.lf-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--lf-line);
}
.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease;
}
.lf-btn--primary {
    min-width: 170px;
    background: var(--lf-blue);
    color: #fff !important;
}
.lf-btn--primary:hover {
    background: var(--lm-navy);
}
.lf-btn--ghost {
    background: transparent;
    color: var(--lm-muted);
}
.lf-btn--ghost:hover {
    background: #e9ecf3;
    color: var(--lm-navy);
}
.lf-btn:focus-visible {
    outline: 2px solid var(--lm-navy);
    outline-offset: 2px;
}
.lf.is-busy .lf-btn--primary {
    opacity: .7;
    pointer-events: none;
}
/* Sıralama: sunucudaki liste gizli, seçim üretilen seçeneklerle yapılır */
.lf-sort-select {
    display: none !important;
}

/* ---- Gönderim tarihi grubu (aynı gün sayfası): sabit açık takvim ---- */
.lf-date__hint {
    margin: 0 0 14px;
    color: var(--lm-muted);
    font-size: 14px;
    line-height: 1.45;
}
.lf-quick {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 560px;
    margin-bottom: 14px;
}
.lf-quick__opt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 68px;
    margin: 0;
    padding: 12px 14px 12px 44px;
    border: 1.5px solid var(--lf-line);
    border-radius: 12px;
    background: #fff;
    color: var(--lm-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.lf-quick__opt::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 1.5px solid #9aa3b2;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lf-quick__opt:hover {
    border-color: var(--lm-navy);
}
.lf-quick__opt:focus-visible {
    outline: 2px solid var(--lm-navy);
    outline-offset: 2px;
}
.lf-quick__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.lf-quick__sub {
    color: var(--lm-muted);
    font-size: 12.5px;
    line-height: 1.3;
}
.lf-quick__opt.is-active {
    border-color: var(--lm-navy);
    background: #eef1f7;
}
.lf-quick__opt.is-active::before {
    border-color: var(--lm-navy);
    background: var(--lm-navy);
    box-shadow: inset 0 0 0 4px #fff;
}
/* Bugün seçiliyse yeşil (aynı gün teslim) */
.lf-quick__opt[data-lf-day="0"].is-active {
    border-color: var(--lm-navy);
    background: #eef1f7;
}
.lf-quick__opt[data-lf-day="0"].is-active::before {
    border-color: var(--lm-navy);
    background: var(--lm-navy);
}
.lf-quick__opt[data-lf-day="0"] .lf-quick__sub {
    color: var(--lm-navy);
    font-weight: 600;
}
/* Takvim yalnızca "Başka bir gün" seçiliyken */
.lf-group--date:not(.is-other) .lf-cal {
    display: none;
}
.lf-date__text {
    min-width: 0;
    overflow: hidden;
    color: var(--lm-ink);
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.lf-date__row {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    height: 46px;
    margin-bottom: 14px;
    padding: 0 14px;
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    background: #fff;
}
.lf-date__row .lf-ico {
    color: var(--lm-navy);
}
.lf-date__label {
    color: var(--lm-muted);
    font-size: 13px;
}
.lf-date__input,
.lf-date__input[readonly] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: 0 !important;
    opacity: 0;
    clip: rect(0 0 0 0);
    pointer-events: none;
}
.lf-nav__value {
    color: var(--lm-muted);
    font-size: 13px;
    font-weight: 600;
}
.lf-nav__item.is-active .lf-nav__value {
    color: var(--lm-navy);
}
/* Takvim (fengyuanchen datepicker, inline) */
.lf-cal .datepicker-container {
    position: static;
    z-index: auto;
    width: 100%;
    max-width: 364px;
    padding: 10px;
    border: 1px solid var(--lf-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    font-size: 14px;
}
.lf-cal .datepicker-container::before,
.lf-cal .datepicker-container::after {
    display: none;
}
.lf-cal .datepicker-panel > ul {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
.lf-cal .datepicker-panel > ul > li {
    float: none;
    width: calc(100% / 7);
    height: 42px;
    line-height: 42px;
    border-radius: 10px;
    background: transparent;
    color: var(--lm-ink);
    font-size: 14px;
}
.lf-cal .datepicker-panel > ul > li[data-view="years prev"],
.lf-cal .datepicker-panel > ul > li[data-view="years next"],
.lf-cal .datepicker-panel > ul > li[data-view="year prev"],
.lf-cal .datepicker-panel > ul > li[data-view="year next"],
.lf-cal .datepicker-panel > ul > li[data-view="month prev"],
.lf-cal .datepicker-panel > ul > li[data-view="month next"] {
    font-size: 20px;
}
.lf-cal .datepicker-panel > ul > li[data-view="years current"],
.lf-cal .datepicker-panel > ul > li[data-view="year current"],
.lf-cal .datepicker-panel > ul > li[data-view="month current"] {
    width: calc(100% / 7 * 5);
    font-weight: 700;
}
.lf-cal .datepicker-panel > ul[data-view="week"] > li,
.lf-cal .datepicker-panel > ul[data-view="week"] > li:hover {
    height: 32px;
    line-height: 32px;
    background: transparent !important;
    color: var(--lm-muted);
    font-size: 12.5px;
    font-weight: 600;
    cursor: default;
}
.lf-cal .datepicker-panel > ul[data-view="years"] > li,
.lf-cal .datepicker-panel > ul[data-view="months"] > li {
    width: 25%;
    height: 52px;
    line-height: 52px;
}
.lf-cal .datepicker-panel > ul > li:hover {
    background: #eef1f7 !important;
}
.lf-cal .datepicker-panel > ul > li.highlighted {
    background: transparent;
    color: var(--lm-navy);
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--lm-navy);
}
.lf-cal .datepicker-panel > ul > li.picked,
.lf-cal .datepicker-panel > ul > li.picked:hover {
    background: var(--lm-navy) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: none;
}
.lf-cal .datepicker-panel > ul > li.muted,
.lf-cal .datepicker-panel > ul > li.muted:hover {
    color: #b9c0cc;
}
.lf-cal .datepicker-panel > ul > li.disabled,
.lf-cal .datepicker-panel > ul > li.disabled:hover {
    background: transparent !important;
    color: #cdd2db;
    cursor: not-allowed;
}

/* ---- Uygulanmış filtreler ---- */
.filter-select.lf-active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.filter-select.lf-active li {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    margin: 0;
    padding: 0 6px 0 14px;
    border: 1px solid #d5dbe7;
    border-radius: 999px;
    background: #eef1f7;
    color: var(--lm-navy);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: default;
}
.filter-select.lf-active li .close {
    position: static;
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--lm-navy);
    font-size: 11px;
    line-height: 1 !important;
    opacity: 1;
    text-shadow: none;
    float: none;
}
.filter-select.lf-active li .close:hover {
    background: var(--lm-navy);
    color: #fff;
}
.filter-select.lf-active li.delete {
    padding: 0;
    border-color: transparent;
    background: transparent;
}
.filter-select.lf-active li.delete a {
    padding: 0 10px;
    color: var(--lm-muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.filter-select.lf-active li.delete a:hover {
    color: var(--lm-navy);
}

/* ---- Tablet ---- */
@media (max-width: 991px) {
    .lf-panel {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    .lf-nav__item {
        padding-left: 20px;
    }
    .lf-body {
        padding: 18px 20px;
    }
}

/* ---- Mobil ---- */
@media (max-width: 767px) {
    .lf {
        margin: 2px 0 12px;
    }
    .lf-bar {
        gap: 8px;
    }
    .lf-toggle,
    .lf-sortbtn,
    .lf-closebtn,
    .lf-switch label {
        height: 44px;
        padding: 0 14px;
        font-size: 14px;
    }
    /* Filtreler ve Sırala yan yana, eşit genişlikte; Aynı Gün alt satırda */
    .lf-toggle,
    .lf-sortbtn,
    .lf-closebtn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        margin-left: 0;
    }
    .lf-toggle {
        order: 1;
    }
    .lf-sortbtn,
    .lf-closebtn {
        order: 2;
    }
    .lf-sortbtn > span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .lf-sortbtn .lf-sort-current {
        display: none;
    }
    .lf-switch {
        order: 3;
        flex: 1 1 100%;
    }
    .lf-quick {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }
    .lf-quick__opt {
        min-height: 58px;
    }
    .lf-switch label {
        width: 100%;
    }
    .lf-switch__hint {
        display: none;
    }

    /* Panel: gruplar üstte yatay sekme, seçenekler altta */
    .lf-panel {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 8px;
        border-radius: 14px;
    }
    .lf-nav {
        flex-direction: row;
        gap: 6px;
        padding: 10px 12px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--lf-line);
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }
    .lf-nav::-webkit-scrollbar {
        display: none;
    }
    .lf-nav__item {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 0 14px;
        border: 1px solid var(--lf-line);
        border-radius: 999px;
        font-size: 14px;
        white-space: nowrap;
    }
    .lf-nav__item:last-child {
        border-bottom: 1px solid var(--lf-line);
    }
    .lf-nav__item.is-active {
        border-color: var(--lm-navy);
        background: var(--lm-navy);
        color: #fff;
    }
    .lf-nav__item.is-active::before {
        display: none;
    }
    .lf-nav__item.is-active .lf-nav__count {
        background: #fff;
        color: var(--lm-navy);
    }
    .lf-body {
        padding: 14px 14px 14px;
    }
    .lf-date__row,
    .lf-cal .datepicker-container {
        max-width: none;
    }
    /* Mobilde sekme kısa kalsın; seçili tarih panelin içinde zaten yazıyor */
    .lf-nav__value {
        display: none;
    }
    .lf-opts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 12px;
    }
    .lf-opts--radio {
        grid-template-columns: minmax(0, 1fr);
    }
    .lf-opts label,
    .lf-all label {
        min-height: 40px;
        font-size: 14px;
    }
    .lf-foot {
        gap: 8px;
        margin-top: 14px;
        padding-top: 12px;
    }
    .lf-foot .lf-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 12px;
    }
    .filter-select.lf-active {
        margin-bottom: 12px;
    }
}
@media (max-width: 359px) {
    .lf-opts {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .lf-panel.is-open {
        animation: none;
    }
}

/* Mobil filtre: dikey gruplar ve sabit uygulama alanı. */
.lf-mobile-head { display: none; }
@media (max-width: 767px) {
    html.lf-modal-open, html.lf-modal-open body { overflow: hidden; }
    .lf-panel.is-open {
        position: fixed; inset: max(20px, env(safe-area-inset-top)) 0 0;
        z-index: 11000; margin: 0; border: 0; border-radius: 14px 14px 0 0;
        grid-template-columns: 40% minmax(0, 1fr);
        grid-template-rows: 56px minmax(0, 1fr) 82px;
        background: white; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55);
        overflow: hidden;
    }
    .lf-mobile-head { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #f0f0f0; }
    .lf-mobile-head button { border: 0; background: transparent; color: #444; min-height: 44px; min-width: 44px; font: inherit; font-size: 13px; }
    .lf-mobile-head button:first-child { font-size: 30px; text-align: left; }
    .lf-mobile-head strong { font-size: 16px; }
    .lf-nav { grid-column: 1; grid-row: 2; flex-direction: column; gap: 0; padding: 0; overflow: auto; border: 0; background: #f7f7f7; }
    .lf-nav__item, .lf-nav__item:last-child { flex: 0 0 auto; justify-content: flex-start; gap: 5px; min-height: 54px; padding: 12px 15px; border: 0; border-bottom: 1px solid #ededed; border-radius: 0; white-space: normal; font-size: 13px; }
    .lf-nav__item.is-active { background: white; color: #444; font-weight: 600; }
    .lf-nav__count, .lf-nav__item.is-active .lf-nav__count { min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; background: var(--lm-navy); color: white; }
    .lf-body { grid-column: 2; grid-row: 2; padding: 0; background: white; min-height: 0; overflow: auto; overscroll-behavior: contain; }
    .lf-tools { position: sticky; top: 0; z-index: 2; background: white; padding: 8px 10px; margin: 0; }
    .lf-search input { background: #f3f3f3; border: 0; border-radius: 12px; height: 40px; font-size: 16px; }
    .lf-all { display: none; }
    .lf-opts { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .lf-opts label { position: relative; min-height: 54px; padding: 14px 34px 14px 15px; border-bottom: 1px solid #f2f2f2; font-size: 13px; }
    .lf-opts label::before { display: none; }
    .lf-opts input:checked + label { color: var(--lm-navy); }
    .lf-opts input:checked + label::after { content: '✓'; position: absolute; right: 14px; top: 16px; width: auto; height: auto; border: 0; background: none; transform: none; color: var(--lm-navy); font-size: 20px; }
    .lf-foot { position: absolute; bottom: 0; left: 0; right: 0; height: 82px; margin: 0; padding: 14px 16px max(20px, env(safe-area-inset-bottom)); background: white; border: 0; }
    .lf-foot .lf-btn--ghost { display: none; }
    .lf-foot .lf-btn--primary { width: 100%; min-height: 46px; border-radius: 8px; background: var(--lm-navy); color: white; font-size: 15px; }
    .lf-group--date { padding: 10px; }
    html.lf-modal-open .sticky-footer, html.lf-modal-open #chatbot-icon { visibility: hidden; }
}

/* Masaüstünde sekmeler değişirken panel ve eylemler yer değiştirmesin. */
@media (min-width: 768px) {
    .lf-panel {
        height: clamp(360px, 60vh, 520px);
        grid-template-rows: minmax(0, 1fr);
    }
    .lf-nav {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .lf-body {
        min-height: 0;
        overflow: hidden;
    }
    .lf-group {
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
    .lf-foot {
        flex: 0 0 auto;
    }
}
/* Yalnızca seçili sekmenin içeriği görünür. */
.lf .lf-body > .lf-group[hidden],
.lf .lf-body > .lf-group:not(.is-active) { display: none !important; }

/* Eski temanın mobil #body_divTarih display:block !important kuralını geçersiz kıl. */
.lf #body_divTarih.lf-group:not(.is-active),
.lf #body_divTarih.lf-group[hidden] {
    display: none !important;
}
/* Aynı gün isteğe bağlı bir panel filtresidir. */
.lf-panel > .lf-switch {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--lf-line);
    background: #fff;
}
@media (min-width: 768px) {
    .lf-panel.has-same-day { grid-template-rows: auto minmax(0, 1fr); }
}
@media (max-width: 767px) {
    .lf-panel.has-same-day { grid-template-rows: 56px auto minmax(0, 1fr) 82px; }
    .lf-panel > .lf-switch { grid-row: 2; order: initial; padding: 8px 14px; }
    .lf-panel.has-same-day > .lf-nav,
    .lf-panel.has-same-day > .lf-body { grid-row: 3; }
}
/* Sıralama bağımsız, teslimat diğer filtrelerle aynı sekme düzeninde. */
.lf-sort-native {
    margin-left: auto; max-width: 100%; height: 46px; padding: 0 32px 0 14px;
    border: 1px solid var(--lf-line); border-radius: 12px; background: #fff;
    color: var(--lm-ink); font: inherit; cursor: pointer;
}
.lf-group[data-lf-group="ayni"] .lf-date__hint { display: block; margin-top: 16px; }
@media (max-width: 767px) {
    .lf-sort-native { flex: 1 1 0; min-width: 0; width: 50%; font-size: 13px; order: 2; }
    .lf-group[data-lf-group="ayni"] .lf-date__hint { padding: 0 15px; font-size: 12px; }
}
.lf-sort-native[hidden] { display: none !important; }
.lf-sort-menu { position: relative; margin-left: auto; }
.lf-sort-trigger { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 46px; padding: 0 16px; border: 1px solid var(--lf-line); border-radius: 12px; background: #fff; color: var(--lm-ink); font: inherit; font-size: 14px; cursor: pointer; }
.lf-sort-trigger::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.lf-sort-trigger[aria-expanded="true"] { border-color: var(--lm-navy); background: #f5f7fb; }
.lf-sort-trigger[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 4px; }
.lf-sort-popup { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; width: 240px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--lf-line); border-radius: 16px; background: white; box-shadow: 0 14px 40px rgba(27,40,71,.14); }
.lf-sort-popup[hidden] { display: none; }
.lf-sort-option { position: relative; display: block; width: 100%; min-height: 44px; border: 0; border-radius: 10px; padding: 10px 36px 10px 12px; text-align: left; background: white; color: var(--lm-ink); font: inherit; font-size: 14px; cursor: pointer; }
.lf-sort-option:hover, .lf-sort-option:focus-visible { background: #f2f4f8; }
.lf-sort-option[aria-current="true"] { background: #eef1f7; color: var(--lm-navy); font-weight: 600; }
.lf-sort-option[aria-current="true"]::after { content: '✓'; position: absolute; right: 12px; }
.lf-sort-trigger:focus-visible, .lf-sort-option:focus-visible { outline: 2px solid var(--lm-navy); outline-offset: 2px; }
@media (max-width: 767px) {
    .lf-sort-menu { flex: 1 1 0; min-width: 0; order: 2; }
    .lf-sort-trigger { width: 100%; gap: 8px; font-size: 13px; }
}
/* Tek seçenekli teslimat filtresi: kapalıyken de görünen aç/kapat anahtarı. */
.lf .lf-group[data-lf-group="ayni"] .lf-opts label {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px 15px;
    cursor: pointer;
}
.lf .lf-group[data-lf-group="ayni"] .lf-opts label::before {
    content: '';
    display: block;
    position: absolute;
    right: 15px;
    top: 50%;
    width: 42px;
    height: 24px;
    margin-top: -12px;
    border: 0;
    border-radius: 999px;
    background: #dce1e9;
    transition: background-color .18s ease;
}
.lf .lf-group[data-lf-group="ayni"] .lf-opts label::after {
    content: '';
    display: block;
    position: absolute;
    right: 35px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transform: none;
    transition: right .18s ease;
}
.lf .lf-group[data-lf-group="ayni"] .lf-opts label { padding-right: 72px; }
.lf .lf-group[data-lf-group="ayni"] .lf-opts input:checked + label::before { background: var(--lm-navy); }
.lf .lf-group[data-lf-group="ayni"] .lf-opts input:checked + label::after {
    content: ''; right: 18px; width: 18px; height: 18px;
    top: 50%; background: #fff; transform: none; border: 0;
}
.lf .lf-group[data-lf-group="ayni"] .lf-opts input:focus-visible + label {
    outline: 2px solid var(--lm-navy); outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
    .lf .lf-group[data-lf-group="ayni"] .lf-opts label::before,
    .lf .lf-group[data-lf-group="ayni"] .lf-opts label::after { transition: none; }
}
.lf-sort-option { text-decoration: none !important; }
