/*
 * Sofra — RestoLand QR menü teması (Tema SDK v1, çekirdek v1.1)
 * Metin öncelikli, katlanır kategoriler + yüzen "Menü" dizini + hızlı süzgeçler. Sistem fontları, uzak kaynak yok.
 * Renkler ayarlardan gelir; ikincil tonlar metin / zemin renklerinden türetilir.
 */

/* ---------- Değişkenler ---------- */
:root {
    --rl-radius: 14px;
    --rl-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --s-head-font: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --s-accent: var(--rl-accent, #B7791F);
    --rl-muted: color-mix(in srgb, var(--rl-text) 70%, var(--rl-background));
    --rl-border: color-mix(in srgb, var(--rl-text) 14%, var(--rl-background));
    --s-line: color-mix(in srgb, var(--rl-text) 20%, var(--rl-background));
    --s-soft: color-mix(in srgb, var(--rl-text) 5%, var(--rl-background));
    --s-primary-soft: color-mix(in srgb, var(--rl-primary) 10%, var(--rl-surface));
    --s-primary-ink: color-mix(in srgb, var(--rl-primary) 85%, var(--rl-text));
    --s-accent-ink: color-mix(in srgb, var(--s-accent) 62%, var(--rl-text));
    --s-accent-soft: color-mix(in srgb, var(--s-accent) 14%, var(--rl-surface));
    --s-veg: #2E7D32;
    --s-gf: #8A5A00;
    --s-halal: #00695C;
    --s-shadow: 0 10px 30px rgba(20, 18, 14, .22);
    /* yapışkan arama + süzgeç çubuğunun yüksekliği: çekirdek [data-rl-sticky] ölçüp <html> üstüne yazar; bu, JS yokken yedek */
    --rl-sticky-offset: 116px;
    --s-max: 1160px;
    /* Alt şeridin (yüzen düğme + çekirdek sepet çubuğu) sol kenarı: çekirdek çubuğun 640 px'lik sütunu */
    --s-dock-x: max(12px, calc(50% - 320px));
}

@supports not (color: color-mix(in srgb, red 50%, blue)) {
    :root {
        --rl-muted: #5B5850;
        --rl-border: #E2DDD3;
        --s-line: #CFC9BE;
        --s-soft: #F2EFE8;
        --s-primary-soft: #EAECF2;
        --s-primary-ink: #2C3A70;
        --s-accent-ink: #6E4E1D;
        --s-accent-soft: #F6ECDD;
    }
}

html.s-font-sans {
    --s-head-font: var(--rl-font-family);
}

/* ---------- Temel ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.s-body {
    margin: 0;
    min-height: 100vh;
    background: var(--rl-background);
    color: var(--rl-text);
    font: 15px/1.5 var(--rl-font-family);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--rl-text);
    outline-offset: 2px;
}

.s-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.s-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.s-i {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    vertical-align: -.2em;
}

.s-skip {
    position: absolute;
    z-index: 90;
    left: 12px;
    top: -60px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--rl-text);
    color: var(--rl-background);
    font-weight: 700;
    text-decoration: none;
}

.s-skip:focus {
    top: 12px;
}

/* ---------- Üst bilgi ---------- */
.s-head {
    position: relative;
    background: var(--rl-surface);
    border-bottom: 1px solid var(--rl-border);
}

/* Üstte ince kilim deseni şeridi */
.s-head::before {
    content: "";
    display: block;
    height: 10px;
    background:
        linear-gradient(135deg, var(--rl-primary) 25%, transparent 25%) -6px 0 / 12px 10px,
        linear-gradient(225deg, var(--rl-primary) 25%, transparent 25%) -6px 0 / 12px 10px,
        var(--s-accent);
}

.s-head__inner {
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 18px 16px 16px;
}

.s-head__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.s-seal {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--rl-primary);
    color: var(--rl-on-primary);
    box-shadow: 0 0 0 3px var(--rl-surface), 0 0 0 5px var(--s-accent);
}

.s-seal__initial {
    font: 700 27px/1 var(--s-head-font);
}

.s-seal img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--rl-surface);
}

.s-head__name {
    margin: 0;
    font: 700 30px/1.12 var(--s-head-font);
    letter-spacing: -.01em;
}

.s-head__tagline {
    margin: 6px 0 0;
    color: var(--s-accent-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.s-head__desc {
    margin: 8px 0 0;
    max-width: 62ch;
    color: var(--rl-muted);
}

.s-head__venue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--s-primary-soft);
    color: var(--s-primary-ink);
    font-size: 14px;
    font-weight: 700;
}

.s-lang ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--rl-border);
    border-radius: 999px;
}

.s-lang a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 999px;
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.s-lang a[aria-current="true"] {
    background: var(--rl-primary);
    color: var(--rl-on-primary);
}

.s-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.s-actions:empty {
    display: none;
}

.s-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--s-line);
    border-radius: 999px;
    color: var(--rl-text);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.s-announce {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    background: var(--s-accent-soft);
    color: var(--s-accent-ink);
    font-weight: 650;
    border-bottom: 1px solid var(--rl-border);
}

.s-announce p {
    margin: 0;
}

/* ---------- Yapışkan arama + süzgeçler ---------- */
.s-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--rl-background);
    border-bottom: 1px solid var(--rl-border);
}

.s-bar__inner {
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 8px 12px;
}

.s-search {
    position: relative;
}

.s-search__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--rl-muted);
    pointer-events: none;
}

.s-search__input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--s-line);
    border-radius: 12px;
    background: var(--rl-surface);
    color: var(--rl-text);
    font: 16px/1 var(--rl-font-family);
    -webkit-appearance: none;
    appearance: none;
}

.s-search__input::placeholder {
    color: var(--rl-muted);
    opacity: 1;
}

.s-search__input:focus-visible {
    outline: 3px solid var(--rl-primary);
    outline-offset: 0;
    border-color: transparent;
}

.s-filters {
    display: flex;
    gap: 8px;
    margin: 8px -12px 0;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.s-filters::-webkit-scrollbar {
    display: none;
}

.s-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--s-line);
    border-radius: 12px;
    background: var(--rl-surface);
    color: var(--rl-text);
    font: 650 14px/1 var(--rl-font-family);
    cursor: pointer;
}

.s-chip[aria-pressed="true"] {
    border-color: var(--rl-primary);
    background: var(--rl-primary);
    color: var(--rl-on-primary);
}

.s-chip .s-diet__icon {
    width: 17px;
    height: 17px;
}

.s-chip[aria-pressed="true"] .s-diet {
    color: inherit;
}

/* ---------- Yerleşim ---------- */
.s-layout {
    max-width: var(--s-max);
    margin: 0 auto;
}

.s-main {
    min-width: 0;
    padding: 4px 16px 140px;
}

.s-main:focus {
    outline: none;
}

.s-noresults {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    margin: 0;
    padding: 36px 12px;
    color: var(--rl-muted);
    font-weight: 600;
    text-align: center;
}

.s-noresults p {
    margin: 0;
    flex-basis: 100%;
}

.s-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 72px 24px;
    color: var(--rl-muted);
    text-align: center;
}

.s-empty .s-i {
    width: 52px;
    height: 52px;
    color: var(--rl-primary);
}

/* ---------- Katlanır bölümler ---------- */
/* kaydırma payı çekirdekte: [data-rl-category] { scroll-margin-top: var(--rl-sticky-offset) } */
.s-sec {
    border-bottom: 1px solid var(--s-line);
}

.s-acc__sum {
    position: sticky;
    top: var(--rl-sticky-offset);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    margin: 0 -16px;
    padding: 8px 16px;
    background: var(--rl-background);
    list-style: none;
    cursor: pointer;
}

.s-acc__sum::-webkit-details-marker {
    display: none;
}

.s-acc__sum:focus-visible {
    outline-offset: -3px;
}

.s-acc__title {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    font: 700 21px/1.25 var(--s-head-font);
}

.s-acc__star {
    color: var(--s-accent);
}

.s-acc__count {
    flex: none;
    min-width: 30px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--s-soft);
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.s-acc__chev {
    width: 22px;
    height: 22px;
    color: var(--rl-muted);
    transition: transform .2s ease;
}

.s-acc[open] > .s-acc__sum .s-acc__chev {
    transform: rotate(180deg);
}

.s-acc__desc {
    margin: -2px 0 6px;
    color: var(--rl-muted);
    font-size: 14px;
    font-style: italic;
}

.s-acc__empty {
    margin: 4px 0 18px;
    padding: 16px;
    border: 1.5px dashed var(--s-line);
    border-radius: var(--rl-radius);
    color: var(--rl-muted);
    text-align: center;
}

.s-sec--featured .s-acc__title {
    color: var(--s-accent-ink);
}

/* ---------- Ürün satırı ---------- */
.s-rows {
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
}

.s-rows__li + .s-rows__li {
    border-top: 1px dashed var(--s-line);
}

.s-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px 0 18px;
}

.s-item--img {
    padding-bottom: 26px;
}

.s-item__body {
    min-width: 0;
}

.s-marks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 0 0 5px;
    font-size: 12.5px;
    font-weight: 700;
}

.s-diet {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--s-veg);
}

.s-diet__icon.s-i {
    flex: none;
    width: 16px;
    height: 16px;
}

.s-diet--gluten_free {
    color: var(--s-gf);
}

.s-diet--halal {
    color: var(--s-halal);
}

.s-mark-featured {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--s-accent-ink);
}

.s-item__name {
    margin: 0;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.3;
}

.s-open {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.s-open::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.s-open:focus-visible {
    outline: none;
}

.s-open:focus-visible::after {
    outline: 3px solid var(--rl-text);
    outline-offset: 2px;
    border-radius: 8px;
}

.s-item__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 4px 0 0;
}

.s-price {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.s-ask {
    padding: 2px 9px;
    border: 1.5px dashed var(--rl-muted);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.s-item__opt {
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 600;
}

.s-item__opt::before {
    content: "·";
    margin-right: 10px;
}

.s-item__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 6px 0 0;
    color: var(--rl-muted);
    font-size: 14px;
    line-height: 1.45;
}

.s-item__extra {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 6px 0 0;
    color: var(--rl-muted);
    font-size: 12.5px;
}

.s-spicy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--s-accent-ink);
    font-weight: 700;
}

.s-spicy__icons {
    display: inline-flex;
}

.s-spicy__icons .s-i {
    width: 13px;
    height: 13px;
}

.s-spicy__icons .s-i + .s-i {
    margin-left: -4px;
}

.s-allergens__label {
    font-weight: 700;
}

.s-allergens em {
    font-style: italic;
}

.s-item__side {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.s-thumb {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--s-soft);
}

.s-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.is-soldout .s-thumb img {
    filter: grayscale(1);
    opacity: .6;
}

.is-soldout .s-item__name {
    color: var(--rl-muted);
}

/* Çekirdek "Ekle" (.rl-add): beyaz zemin, ana renk yazı; görsel varsa görselin altına biner */
.s-add.rl-add {
    position: relative;
    z-index: 2;
    min-width: 96px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--s-line);
    border-radius: 10px;
    background: var(--rl-surface);
    color: var(--s-primary-ink);
    font-size: 14.5px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(20, 18, 14, .10);
}

.s-item--img .s-add.rl-add {
    margin-top: -24px;
}

/* Tükendi: çekirdek etiketi (.rl-sold-out) düğmenin yerinde, aynı ölçüde; düğme basılmaz */
.s-soldout.rl-sold-out {
    position: relative;
    z-index: 2;
    justify-content: center;
    min-width: 96px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--s-line);
    border-radius: 10px;
    background: var(--s-soft);
    color: var(--rl-muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.s-item--img .s-soldout.rl-sold-out {
    margin-top: -18px;
}

/* ---------- Yüzen "Menü" düğmesi ve kategori dizini ---------- */
.s-fab {
    position: fixed;
    z-index: 45;
    left: var(--s-dock-x);
    bottom: max(12px, env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 24px);
    min-height: 52px;
    padding: 0 20px 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--rl-text);
    color: var(--rl-background);
    font: 800 15px/1 var(--rl-font-family);
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: var(--s-shadow);
    cursor: pointer;
    transition: bottom .2s ease;
}

.s-fab .s-i {
    width: 20px;
    height: 20px;
}

.s-fab__current {
    max-width: 34vw;
    overflow: hidden;
    color: color-mix(in srgb, var(--rl-background) 78%, var(--rl-text));
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.s-fab__current:empty {
    display: none;
}

/* Sepet çubuğu görünürken düğme yuvarlak simgeye küçülür ve sepet çubuğuyla aynı satıra, soluna oturur:
   altta iki kat yerine tek şerit kalır, "Ekle" düğmelerinin (sağ sütun) üstü boş kalır. */
body:has(.rl-cartbar:not([hidden])) .s-fab {
    width: 56px;
    min-height: 56px;
    padding: 0;
    justify-content: center;
}

body:has(.rl-cartbar:not([hidden])) .s-fab__label,
body:has(.rl-cartbar:not([hidden])) .s-fab__current {
    display: none;
}

body:has(.rl-cartbar:not([hidden])) .s-fab .s-i {
    width: 24px;
    height: 24px;
}

.s-index {
    position: fixed;
    inset: auto auto calc(max(12px, env(safe-area-inset-bottom)) + 64px) var(--s-dock-x);
    width: min(340px, calc(100vw - 24px));
    max-height: min(72vh, 600px);
    margin: 0;
    padding: 0 0 8px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 20px;
    background: var(--rl-text);
    color: var(--rl-background);
    box-shadow: var(--s-shadow);
}

body:has(.rl-cartbar:not([hidden])) .s-index {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 68px);
}

.s-index::backdrop {
    background: rgba(10, 10, 10, .4);
}

.s-index.is-open {
    display: block;
    z-index: 55;
}

/* Popover desteklemeyen eski tarayıcı: tema JS'i sınıfla açıp kapatır */
.s-no-popover .s-index:not(.is-open) {
    display: none;
}

.s-index__head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 6px 20px;
    background: inherit;
}

.s-index__title {
    margin: 0;
    font: 700 18px/1.2 var(--s-head-font);
}

.s-index__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.s-index__close .s-i {
    width: 22px;
    height: 22px;
}

.s-index__close:focus-visible,
.s-index__link:focus-visible {
    outline: 3px solid var(--rl-background);
    outline-offset: -3px;
}

.s-index__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.s-index__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 8px 20px;
    color: inherit;
    font-size: 15.5px;
    font-weight: 600;
    text-decoration: none;
}

.s-index__name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.s-index__star {
    color: var(--s-accent);
}

.s-index__count {
    flex: none;
    color: color-mix(in srgb, var(--rl-background) 72%, var(--rl-text));
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.s-index__link.is-active {
    background: color-mix(in srgb, var(--rl-background) 14%, var(--rl-text));
    font-weight: 800;
}

.s-index__link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--s-accent);
}

/* ---------- Şubeler, alt bilgi, ortak düğmeler ---------- */
.s-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font: 750 14.5px/1 var(--rl-font-family);
    text-decoration: none;
    cursor: pointer;
}

.s-btn--primary {
    border: 0;
    background: var(--rl-primary);
    color: var(--rl-on-primary);
}

.s-btn--ghost {
    border: 1px solid var(--s-line);
    background: var(--rl-surface);
    color: var(--rl-text);
}

.s-venues {
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 28px 16px 8px;
}

.s-venues__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font: 700 21px/1.25 var(--s-head-font);
}

.s-venues__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.s-venue {
    padding: 14px 16px;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface);
}

.s-venue.is-current {
    border: 2px solid var(--rl-primary);
}

.s-venue__name {
    margin: 0 0 4px;
    font: 700 17px/1.3 var(--s-head-font);
}

.s-venue__addr,
.s-venue__phone {
    margin: 0 0 4px;
    color: var(--rl-muted);
    font-size: 14px;
}

.s-venue__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.s-foot {
    max-width: var(--s-max);
    margin: 0 auto;
    padding: 22px 16px calc(120px + env(safe-area-inset-bottom));
    color: var(--rl-muted);
    font-size: 13.5px;
}

.s-foot__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
}

.s-foot__kimlink,
.s-foot__top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--rl-text);
    font-weight: 750;
    text-decoration: none;
}

.s-foot__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--rl-border);
}

.s-foot__meta p {
    margin: 0;
}

/* ---------- Süzgeç durumu (tema JS'i) ---------- */
.s-filtered-out {
    display: none !important;
}

html.s-filtering [data-s-featured-section] {
    display: none;
}

/* ---------- Çekirdek arayüzü ---------- */
.rl-cartbar {
    border-radius: 14px;
}

/* Telefon / tablet: arama + süzgeç şeridi aşağı kaydırırken gizlenir (tema JS'i html.s-bar-up) */
@media (max-width: 1023px) {
    .s-bar {
        transition: transform .22s ease;
    }

    .s-acc__sum {
        transition: top .22s ease;
    }

    html.s-bar-up .s-bar {
        transform: translateY(-100%);
    }

    html.s-bar-up .s-acc__sum {
        top: 0;
    }

    html.s-bar-up .s-sec {
        scroll-margin-top: 0;
    }
}

/* Telefon / tablet: sepet çubuğu yüzen "Menü" düğmesine yer açar (aynı satır, aynı sol kenar; çekirdek değişkenleri).
   Çubuk düğmenin sağındaki bütün şeridi kaplasın diye çekirdeğin 640 px'lik ortalaması kapatılır. */
@media (max-width: 1023px) {
    :root {
        --rl-cartbar-left: calc(var(--s-dock-x) + 64px);
        --rl-cartbar-right: var(--s-dock-x);
    }

    .rl-cartbar {
        max-width: none;
        margin: 0;
    }
}

.rl-drawer {
    border-radius: 20px 20px 0 0;
}

.rl-drawer__title {
    font-family: var(--s-head-font);
}

/* ---------- Etkileşim ---------- */
@media (hover: hover) and (pointer: fine) {
    .s-acc__sum:hover .s-acc__title {
        text-decoration: underline;
        text-underline-offset: 4px;
        text-decoration-thickness: 1px;
    }

    .s-item:hover .s-item__name {
        color: var(--s-primary-ink);
    }

    .s-action:hover,
    .s-chip:hover,
    .s-btn--ghost:hover {
        border-color: var(--rl-muted);
    }

    .s-index__link:hover {
        background: color-mix(in srgb, var(--rl-background) 9%, var(--rl-text));
    }
}

/* ---------- Duyarlı yerleşim ---------- */
@media (max-width: 359px) {
    .s-item__side,
    .s-thumb {
        width: 88px;
    }

    .s-thumb {
        height: 88px;
    }

    .s-add.rl-add,
    .s-soldout.rl-sold-out {
        min-width: 80px;
        padding: 0 10px;
    }

    .s-head__name {
        font-size: 26px;
    }
}

@media (min-width: 768px) {
    .s-head__inner {
        padding: 28px 24px 22px;
    }

    .s-head__name {
        font-size: 40px;
    }

    :root {
        --s-dock-x: max(24px, calc(50% - 386px));
    }

    .s-bar__inner {
        padding: 10px 24px;
    }

    .s-filters {
        margin: 8px 0 0;
        padding: 0;
        flex-wrap: wrap;
    }

    .s-layout {
        max-width: 820px;
    }

    .s-main {
        padding: 4px 24px 140px;
    }

    .s-acc__sum {
        margin: 0 -24px;
        padding: 12px 24px;
    }

    .s-acc__title {
        font-size: 24px;
    }

    .s-item__side,
    .s-thumb {
        width: 132px;
    }

    .s-thumb {
        height: 132px;
    }

    .s-venues,
    .s-foot {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Masaüstü: dizin her zaman görünen yapışkan yan sütun, yüzen düğme gizli */
@media (min-width: 1024px) {
    .s-layout {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 32px;
        max-width: var(--s-max);
        padding: 0 24px;
    }

    .s-index,
    .s-index:popover-open,
    .s-no-popover .s-index:not(.is-open) {
        position: sticky;
        inset: auto;
        top: calc(var(--rl-sticky-offset) + 20px);
        display: block;
        width: auto;
        max-height: calc(100vh - var(--rl-sticky-offset) - 40px);
        max-height: calc(100dvh - var(--rl-sticky-offset) - 40px);
        margin: 20px 0;
        border: 1px solid var(--rl-border);
        background: var(--rl-surface);
        color: var(--rl-text);
        box-shadow: none;
    }

    .s-index::backdrop {
        display: none;
    }

    .s-index__close,
    .s-fab {
        display: none;
    }

    .s-index__head {
        padding: 16px 20px 8px;
    }

    .s-index__close:focus-visible,
    .s-index__link:focus-visible {
        outline-color: var(--rl-text);
    }

    .s-index__count {
        color: var(--rl-muted);
    }

    .s-index__link.is-active {
        background: var(--s-primary-soft);
        color: var(--s-primary-ink);
    }

    .s-index__link.is-active .s-index__count {
        color: var(--s-primary-ink);
    }

    .s-main {
        padding: 4px 0 140px;
    }

    .s-acc__sum {
        margin: 0;
        padding: 12px 0;
    }

    .s-head__inner,
    .s-bar__inner,
    .s-venues,
    .s-foot {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ---------- Erişilebilirlik tercihleri, yazdırma ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

@media (forced-colors: active) {
    .s-chip[aria-pressed="true"] {
        outline: 2px solid Highlight;
    }

    .s-index__link.is-active {
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }

    .s-diet__icon {
        color: CanvasText;
    }
}

@media print {
    .s-bar,
    .s-fab,
    .s-index,
    .s-actions,
    .rl-cartbar,
    .s-add,
    .s-skip {
        display: none !important;
    }

    .s-acc__sum {
        position: static;
    }

    .s-acc__chev {
        display: none;
    }
}
