:root {
    --sl-bg: #f2f2f7;
    --sl-surface: #ffffff;
    --sl-text-main: #111827;
    --sl-text-muted: #6b7280;
    --sl-accent: #ff3b30;
    --sl-accent-rgb: 255, 59, 48;
    --sl-accent-soft: #ffe5e0;
    --sl-radius-lg: 24px;
    --sl-radius-md: 18px;
    --sl-shadow-soft: 0 10px 30px rgba(0,0,0,0.06);
    --sl-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

/* Theme colors can be overridden per-restaurant */
/* Example: --sl-accent: #3b82f6; --sl-accent-rgb: 59, 130, 246; */

body {
    margin: 0;
    padding: 0;
    font-family: var(--sl-font-family) !important;
    background: var(--sl-bg, #f2f2f7);
    color: var(--sl-text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Soft renk gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: linear-gradient(
        180deg,
        var(--sl-accent-soft, #ffe5e0) 0%,
        rgba(var(--sl-accent-soft-rgb, 255,229,224), 0.5) 30%,
        transparent 60%
    );
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Global font inheritance */
body * {
    font-family: inherit;
}

* {
    box-sizing: border-box;
}

/* =============================================
   APP SHELL - Container
   ============================================= */
.app-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.app-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

/* Desktop'ta tema renkli çerçeve */
@media (min-width: 520px) {
    .app-inner {
        border: 3px solid var(--sl-accent, #3b82f6);
        border-radius: 32px;
        margin-top: 20px;
        margin-bottom: 20px;
        background: var(--sl-bg, #f2f2f7);
        box-shadow: 
            0 0 0 8px rgba(var(--sl-accent-rgb, 59,130,246), 0.08),
            0 25px 50px -12px rgba(0,0,0,0.15);
    }
}

@media (min-width: 768px) {
    .app-inner {
        padding-top: 32px;
        padding-bottom: 40px;
    }
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
.brand-slogan {
    font-size: 13px;
    color: var(--sl-text-muted);
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
}

/* =============================================
   SECTION TITLES - Global
   ============================================= */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 28px 0 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sl-text-main);
    text-align: center;
}

/* Decorative accent lines */
.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    max-width: 50px;
    height: 2px;
    border-radius: 2px;
    opacity: 0.3;
}

.section-title::before {
    background: linear-gradient(90deg, transparent, var(--sl-accent));
}

.section-title::after {
    background: linear-gradient(90deg, var(--sl-accent), transparent);
}

/* =============================================
   CTA BUTTON - Base
   ============================================= */
.cta-btn {
    width: 100%;
    border: none;
    outline: none;
    border-radius: var(--sl-radius-lg);
    background: var(--sl-accent);
    color: #fff;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-btn:hover {
    filter: brightness(1.05);
}

.cta-btn:active {
    filter: brightness(0.98);
}

.cta-title {
    font-size: 16px;
    font-weight: 600;
}

.cta-sub {
    font-size: 12px;
    opacity: .85;
}

.cta-block {
    margin-bottom: 14px;
}

/* =============================================
   LOGO BLOCK - Base
   ============================================= */
.logo-block {
    text-align: center;
    margin-bottom: 18px;
}

.logo-block-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-img-wrap {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,0.1);
}

.logo-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =============================================
   FEATURED CARDS - Şefin Tavsiyesi
   ============================================= */
.featured-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.featured-card {
    background: rgba(255,255,255,0.8);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.04),
        0 8px 24px rgba(15,23,42,0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: row;
    transition: all 0.25s ease;
}

.featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.06),
        0 12px 32px rgba(15,23,42,0.1);
}

.featured-card-img {
    width: 110px;
    min-width: 110px;
    overflow: hidden;
}

.featured-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 90px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-card-img img {
    transform: scale(1.05);
}

.featured-card-body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.featured-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--sl-text-main);
    line-height: 1.3;
}

.featured-card-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--sl-accent);
    white-space: nowrap;
    padding: 4px 10px;
    background: rgba(var(--sl-accent-rgb), 0.08);
    border-radius: 8px;
}

.featured-card-desc {
    font-size: 13px;
    color: var(--sl-text-muted);
    line-height: 1.4;
}

/* =============================================
   LANGUAGE SWITCH
   ============================================= */
.lang-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--sl-text-muted);
}

.lang-pill {
    padding: 3px 8px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--sl-text-muted);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-pill.is-active {
    background: var(--sl-accent);
    color: #ffffff;
    border-color: var(--sl-accent);
    box-shadow: 0 2px 8px rgba(var(--sl-accent-rgb), 0.25);
}

.lang-sep {
    opacity: .5;
}

/* =============================================
   POPUP STYLES
   ============================================= */
.sl-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    z-index: 999;
}

.sl-popup-hidden {
    display: none !important;
}

.sl-popup {
    background: #ffffff;
    max-width: 360px;
    width: 100%;
    border-radius: 24px;
    box-shadow: 
        0 24px 60px rgba(15,23,42,0.35),
        0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    position: relative;
    animation: popupZoomIn 0.3s ease;
}

@keyframes popupZoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.sl-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15,23,42,0.08);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.sl-popup-close:hover {
    background: rgba(15,23,42,0.12);
}

.sl-popup-image img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.sl-popup-content {
    padding: 14px 16px 18px;
}

.sl-popup-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--sl-text-main);
}

.sl-popup-text {
    font-size: 14px;
    color: var(--sl-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.sl-popup-products-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--sl-text-main);
}

.sl-popup-products {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.sl-popup-product-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
}

.sl-popup-product-name {
    font-weight: 500;
    color: var(--sl-text-main);
}

.sl-popup-product-price {
    font-weight: 700;
    color: var(--sl-accent);
}

/* =============================================
   BRANDING
   ============================================= */
.sl-branding {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    font-size: 11px;
}

.sl-branding-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    border: 1.5px solid rgba(var(--sl-accent-rgb, 59,130,246), 0.15);
    box-shadow: 
        0 4px 16px rgba(15,23,42,0.04),
        0 0 20px rgba(var(--sl-accent-rgb, 59,130,246), 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: all 0.2s ease;
}

.sl-branding-pill:hover {
    background: rgba(255,255,255,0.7);
    border-color: rgba(var(--sl-accent-rgb, 59,130,246), 0.25);
}

.sl-branding-logo {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--sl-accent, #1e293b) 0%, var(--sl-accent, #334155) 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.sl-branding-text {
    color: var(--sl-text-muted);
    font-size: 12px;
}

/* =============================================
   UTILITIES
   ============================================= */
.footer-note {
    text-align: center;
    margin-top: 26px;
    padding: 10px 16px;
    font-size: 11px;
    color: var(--sl-text-muted);
    background: rgba(255,255,255,0.4);
    border-radius: 999px;
    border: 1px solid rgba(var(--sl-accent-rgb, 59,130,246), 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

/* Sheet / popup açıkken body scroll kilidi */
body.sl-no-scroll {
    overflow: hidden;
}

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton-card {
    pointer-events: none;
}

.skeleton-img {
    width: 100%;
    height: 130px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, #e5e7eb 0px, #f3f4f6 40px, #e5e7eb 80px);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s infinite;
}

.skeleton-line {
    height: 10px;
    border-radius: 999px;
    margin-top: 6px;
    background: linear-gradient(90deg, #e5e7eb 0px, #f3f4f6 40px, #e5e7eb 80px);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s infinite;
}

.skeleton-line-lg { width: 70%; }
.skeleton-line-sm { width: 40%; }

@keyframes skeletonShimmer {
    0% { background-position: -80px 0; }
    100% { background-position: 80px 0; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slCategoryFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slTabPulse {
    0%   { transform: scale(0.94); }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1.00); }
}

@keyframes favPop {
    0%   { transform: scale(0.9); }
    40%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Favori kalp ikonu */
.fav-tab-icon {
    font-size: 12px;
    margin-right: 2px;
    color: #dc2626;
}

.fav-tab-text {
    font-size: 12px;
}

.fav-tab-count {
    background: #fff;
    color: #111;
    border-radius: 999px;
    padding: 0px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* =============================================
   DISABLE TEXT SELECTION - Prevent copy
   ============================================= */
.app-shell {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Allow selection in input fields */
.app-shell input,
.app-shell textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}