/* QR alt sayfalar — menü / minibar / oda servisi / gece / kanallar (otel lacivert) */

:root {

    --primary: #073866;

    --primary-dark: #052847;

    --primary-light: #0c5a9e;

    --bg: #f8fafc;

    --card-bg: #ffffff;

    --text: #1e293b;

    --text-light: #64748b;

    --border: #e2e8f0;

    --info-bg: #EFF6FF;

    --info-border: #BFDBFE;

    --info-text: #1E3A5F;

    --qr-header-h: 64px;

}



* { margin: 0; padding: 0; box-sizing: border-box; }



body.qr-subpage {

    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;

    background: var(--bg);

    color: var(--text);

    min-height: 100vh;

    padding-bottom: 48px;

}



/* Header */

.qr-subpage .header {

    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);

    color: white;

    padding: 10px 16px;

    position: sticky;

    top: 0;

    z-index: 100;

    box-shadow: 0 4px 20px rgba(5, 40, 71, 0.28);

}



.qr-subpage .header-content {

    max-width: 600px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    min-height: 44px;

}



.qr-subpage .back-btn,

.qr-subpage .back-spacer {

    width: 40px;

    height: 40px;

    min-width: 40px;

    flex-shrink: 0;

}



.qr-subpage .back-btn {

    border-radius: 12px;

    background: rgba(255,255,255,0.15);

    color: white;

    font-size: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;

    transition: background 0.2s;

    touch-action: manipulation;

}



.qr-subpage .back-btn:hover { background: rgba(255,255,255,0.25); }



.qr-subpage .header-brand {

    flex: 1;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 10px;

    justify-content: center;

}



.qr-subpage .header-logo {

    width: 36px;

    height: 36px;

    border-radius: 10px;

    object-fit: contain;

    background: rgba(255,255,255,0.12);

    padding: 3px;

    flex-shrink: 0;

}



.qr-subpage .header-logo-fallback {

    width: 36px;

    height: 36px;

    border-radius: 10px;

    background: rgba(255,255,255,0.15);

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    font-size: 16px;

}



.qr-subpage .header-titles {

    min-width: 0;

    text-align: left;

}



.qr-subpage .header-title {

    font-size: 16px;

    font-weight: 800;

    line-height: 1.2;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.qr-subpage .header-subtitle {

    font-size: 11px;

    font-weight: 600;

    opacity: 0.88;

    line-height: 1.2;

    margin-top: 2px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}



.qr-subpage .lang-selector-mini {

    display: flex;

    gap: 5px;

    flex-shrink: 0;

}



.qr-subpage .lang-mini {

    width: 28px;

    height: 28px;

    border-radius: 50%;

    overflow: hidden;

    border: 2px solid rgba(255,255,255,0.3);

    transition: all 0.2s;

}



.qr-subpage .lang-mini:hover,

.qr-subpage .lang-mini.active {

    border-color: white;

    transform: scale(1.08);

}



.qr-subpage .lang-mini img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

}



/* Bilgi bandı */

.qr-subpage .info-banner {

    max-width: 600px;

    margin: 15px auto 0;

    padding: 0 20px;

}



.qr-subpage .info-banner-content {

    background: var(--info-bg);

    border: 1px solid var(--info-border);

    border-radius: 12px;

    padding: 12px 15px;

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    font-size: 14px;

    font-weight: 600;

    color: var(--info-text);

    line-height: 1.4;

}



.qr-subpage .info-banner-content i { font-size: 18px; flex-shrink: 0; color: var(--primary); }

.qr-subpage .info-banner-content strong {

    font-family: ui-monospace, monospace;

    font-size: 16px;

    letter-spacing: 1px;

    color: var(--primary-dark);

}



/* Arama */

.qr-subpage .search-container {

    max-width: 600px;

    margin: 0 auto;

    padding: 15px 20px 10px;

}



.qr-subpage .search-box {

    display: flex;

    align-items: center;

    background: var(--card-bg);

    border: 2px solid var(--border);

    border-radius: 14px;

    padding: 10px 14px;

    transition: border-color 0.2s, box-shadow 0.2s;

}



.qr-subpage .search-box:focus-within {

    border-color: var(--primary);

    box-shadow: 0 0 0 3px rgba(7, 56, 102, 0.12);

}



.qr-subpage .search-box i.fa-search {

    color: var(--text-light);

    margin-right: 10px;

    font-size: 16px;

    flex-shrink: 0;

}



.qr-subpage .search-box input {

    flex: 1;

    border: none;

    outline: none;

    font-size: 16px;

    font-family: inherit;

    color: var(--text);

    background: transparent;

    min-width: 0;

}



.qr-subpage .search-clear {

    width: 32px;

    height: 32px;

    min-width: 32px;

    border: none;

    border-radius: 8px;

    background: #F3F4F6;

    color: #6B7280;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-left: 6px;

    touch-action: manipulation;

}



.qr-subpage .search-clear:hover { background: #E5E7EB; color: #374151; }



/* Kategori sekmeleri */

.qr-subpage .category-tabs-wrapper {

    max-width: 600px;

    margin: 0 auto;

    position: sticky;

    top: var(--qr-header-h);

    z-index: 90;

    background: linear-gradient(to bottom, var(--bg) 70%, transparent);

    padding: 4px 0 10px;

}



.qr-subpage .category-tabs {

    padding: 0 20px;

    display: flex;

    gap: 8px;

    overflow-x: auto;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;

}



.qr-subpage .category-tabs::-webkit-scrollbar { display: none; }



.qr-subpage .category-tab {

    flex-shrink: 0;

    padding: 8px 16px;

    background: var(--card-bg);

    border: 2px solid var(--border);

    border-radius: 25px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s;

    white-space: nowrap;

    touch-action: manipulation;

    display: inline-flex;

    align-items: center;

    gap: 6px;

}



.qr-subpage .tab-emoji { font-size: 15px; line-height: 1; }



.qr-subpage .category-tab:hover { border-color: var(--primary); }



.qr-subpage .category-tab.active {

    background: var(--primary);

    border-color: var(--primary);

    color: white;

}



/* Ürün listesi */

.qr-subpage .products-container,

.qr-subpage .content-container {

    max-width: 600px;

    margin: 0 auto;

    padding: 0 20px;

}



.qr-subpage .category-section { margin-bottom: 24px; }



.qr-subpage .category-header {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 12px;

    padding-bottom: 8px;

    border-bottom: 2px solid var(--border);

}



.qr-subpage .products-container.is-filtered .category-header {

    display: none;

}



.qr-subpage .category-icon { font-size: 22px; line-height: 1; }



.qr-subpage .category-name {

    font-size: 18px;

    font-weight: 700;

}



.qr-subpage .product-card {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 12px;

    background: var(--card-bg);

    border-radius: 16px;

    margin-bottom: 10px;

    border: 1px solid var(--border);

    transition: box-shadow 0.2s, transform 0.2s;

}



.qr-subpage .product-card:hover {

    box-shadow: 0 4px 14px rgba(0,0,0,0.07);

    transform: translateY(-1px);

}



.qr-subpage .product-image {

    width: 76px;

    height: 76px;

    border-radius: 12px;

    background: linear-gradient(145deg, #EFF6FF 0%, #F1F5F9 100%);

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    border: 1px solid var(--info-border);

}



.qr-subpage .product-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.qr-subpage .product-image i {

    font-size: 26px;

    color: #94a3b8;

}



.qr-subpage .product-placeholder-emoji {

    font-size: 32px;

    line-height: 1;

}



.qr-subpage .product-info {

    flex: 1;

    min-width: 0;

}



.qr-subpage .product-name {

    font-size: 16px;

    font-weight: 700;

    margin-bottom: 4px;

    line-height: 1.3;

}



.qr-subpage .product-desc {

    font-size: 13px;

    color: var(--text-light);

    margin-bottom: 6px;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;

}



.qr-subpage .product-price {

    font-size: 17px;

    font-weight: 800;

    color: var(--primary);

}



/* Arama / filtre boş durumu */

.qr-subpage .filter-empty-state {

    text-align: center;

    padding: 48px 20px 60px;

    color: var(--text-light);

}



.qr-subpage .filter-empty-state i {

    font-size: 40px;

    margin-bottom: 12px;

    opacity: 0.45;

    color: var(--primary);

}



.qr-subpage .filter-empty-state p {

    font-size: 15px;

    font-weight: 600;

    color: var(--text);

}



/* TV kanalları */

.qr-subpage .channel-card {

    display: flex;

    align-items: center;

    gap: 14px;

    padding: 14px 16px;

    background: var(--card-bg);

    border-radius: 14px;

    margin-bottom: 8px;

    border: 1px solid var(--border);

}



.qr-subpage .channel-no-badge {

    min-width: 44px;

    height: 44px;

    padding: 0 8px;

    border-radius: 10px;

    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);

    color: white;

    font-weight: 800;

    font-size: 15px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

}



.qr-subpage .channel-name {

    font-size: 16px;

    font-weight: 700;

    line-height: 1.35;

}



.qr-subpage .empty-state {

    text-align: center;

    padding: 60px 20px;

    color: var(--text-light);

}



.qr-subpage .empty-state i {

    font-size: 48px;

    margin-bottom: 15px;

    opacity: 0.45;

    color: var(--primary);

}



.qr-subpage .empty-state p { font-size: 15px; font-weight: 600; }



.qr-subpage .hidden { display: none !important; }



@media (max-width: 380px) {

    .qr-subpage .header-title { font-size: 15px; }

    .qr-subpage .header-subtitle { font-size: 10px; }

    .qr-subpage .product-image { width: 68px; height: 68px; }

    .qr-subpage .product-name { font-size: 15px; }

    .qr-subpage .product-price { font-size: 16px; }

}



/* Garson çağır — menü QR FAB + modal */

body.qr-subpage.qr-has-garson { padding-bottom: 88px; }

body.qr-subpage.qr-modal-open { overflow: hidden; touch-action: none; }

.qr-garson-fab {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 8000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(7, 56, 102, .35);
    cursor: pointer;
    touch-action: manipulation;
}

.qr-garson-fab:active { background: var(--primary-dark); }

.qr-garson-fab i { font-size: 16px; }

.qr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    overscroll-behavior: contain;
}

.qr-modal-overlay.active { display: flex; }

@media (min-width: 560px) {
    .qr-modal-overlay { align-items: center; padding: 16px; }
}

.qr-modal {
    background: #fff;
    color: #111827;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 440px;
    max-height: min(92dvh, 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .22);
}

.qr-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #D1D5DB;
    border-radius: 2px;
    margin: 8px auto 4px;
    flex-shrink: 0;
}

@media (min-width: 560px) {
    .qr-modal::before { display: none; }
    .qr-modal { border-radius: 20px; max-height: min(88dvh, 640px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
}

.qr-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px 16px 0;
}

.qr-modal-header h3 { font-size: 18px; font-weight: 800; margin: 0; line-height: 1.3; flex: 1; }

.qr-modal-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #F3F4F6;
    color: #374151;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-guest-hint { flex-shrink: 0; margin: 10px 16px 0; font-size: 13px; color: #6B7280; line-height: 1.45; }

.qr-modal form { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

.qr-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px 16px 8px;
}

.qr-field { margin-bottom: 12px; }

.qr-field label { display: block; font-size: 12px; font-weight: 700; color: #6B7280; margin-bottom: 4px; }

.qr-field input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
}

.qr-modal-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #E5E7EB;
    background: #fff;
}

.qr-action-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    touch-action: manipulation;
    font-family: inherit;
}

.qr-action-btn--primary { background: var(--primary); color: #fff; }

.qr-action-btn--ghost { background: #F3F4F6; color: #374151; }

.qr-action-btn:disabled { opacity: .6; cursor: not-allowed; }

.qr-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #111827;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: transform .3s, opacity .3s;
    max-width: 90%;
    text-align: center;
}

.qr-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.qr-toast.warn { background: #92400E; }
