/* Extracted from Views/Shared/_Layout.cshtml */
/* SAFE TOUCH HANDLING (NO SCROLL BLOCKING) */
        button, a {
            touch-action: manipulation;
            -ms-touch-action: manipulation;
        }

        /* MODERN RESPONSIVE FONT SCALING (CSS, NOT JS) */
        html {
            font-size: clamp(14px, 4vw, 18px);
        }

        html, body {
            width: 100%;
            min-height: 100%;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }


        /* Header Styles */
        header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 999;
            background-color: white;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        /* Body Styles (SAFE AREA AWARE + SCROLL ENABLED) */
        body {
            padding-top: calc(78px + env(safe-area-inset-top));
            margin: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* Back Button */
        .back-button {
            width: 46px;
            height: 46px;
            min-width: 46px;
            display: none;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(252, 179, 14, 0.16);
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.84);
            color: #191919;
            font-size: 20px;
            box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
            text-decoration: none;
            transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
        }

        .back-button:hover,
        .back-button:focus {
            color: #191919;
            text-decoration: none;
        }

        .back-button:active {
            transform: scale(0.96);
        }

        .back-button i {
            line-height: 1;
        }

        #back-button.back-button,
        .back-button.xizmat-top-action {
            width: 46px !important;
            height: 46px !important;
            min-width: 46px !important;
            display: none;
            align-items: center !important;
            justify-content: center !important;
            border: 1px solid rgba(252, 179, 14, 0.16) !important;
            border-radius: 14px !important;
            background: rgba(255, 255, 255, 0.84) !important;
            color: #191919 !important;
            box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08) !important;
            text-decoration: none !important;
        }

        #back-button.back-button i,
        .back-button.xizmat-top-action i {
            font-size: 20px !important;
            line-height: 1 !important;
        }

        /* Location Icon */
        .location-icon {
            color: red;
        }

        /* Location Modal */
        #locationModal .modal-dialog {
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto;
            min-height: var(--app-viewport-height, 100dvh);
            max-width: 700px;
            width: 80%;
        }

        #locationModal .modal-content {
            margin: auto;
        }

        /* Location Search Button */
        #location-search-btn {
            height: 100%;
            margin-left: 5px;
        }

        /* Cart Icon */
        .cart-icon-container {
            position: relative;
            display: inline-block;
            transform: translateX(-10px);
        }

            .cart-icon-container img {
                width: 40px;
                height: auto;
            }

        .custom-nav {
            min-height: calc(78px + env(safe-area-inset-top));
            padding-top: env(safe-area-inset-top);
        }

        .custom-nav-inner {
            display: grid;
            grid-template-columns: 54px minmax(0, 1fr) 54px;
            align-items: center;
            width: 100%;
            gap: 8px;
        }

        .custom-nav-inner.home-index-nav {
            grid-template-columns: 1fr;
            justify-items: center;
        }

        .home-index-nav .custom-nav-inner-close {
            display: none;
        }

        .home-index-nav .custom-nav-inner-cart {
            display: none;
        }

        body.telegram-profile-page .custom-nav-inner-cart {
            display: none !important;
        }

        body.auth-entry-page .custom-nav-inner-close,
        body.auth-entry-page .custom-nav-inner-cart {
            display: none !important;
        }

        body.auth-entry-page .custom-nav-inner {
            grid-template-columns: 1fr !important;
            justify-items: center;
        }

        body.auth-entry-page .custom-nav-inner-logo {
            grid-column: 1;
            width: 100%;
            justify-content: center;
        }

        .home-index-nav .custom-nav-inner-logo {
            grid-column: 1;
            width: 100%;
            margin-left: 0 !important;
        }

        .custom-nav-inner-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
        }

        .xizmat-brand {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            width: min(330px, 100%);
            justify-content: center;
            padding: 7px 14px 7px 10px;
            border-radius: 20px;
            background: linear-gradient(135deg, #FFFFFF 0%, #FFF7DD 100%);
            box-shadow: inset 0 0 0 1px rgba(252, 179, 14, 0.18), 0 8px 18px rgba(0, 0, 0, 0.06);
        }

        .xizmat-brand-mark {
            width: 48px;
            height: 48px;
            flex: 0 0 48px;
            border-radius: 14px;
            object-fit: contain;
            object-position: center;
            background: #FFFFFF;
            box-shadow: 0 4px 12px rgba(252, 179, 14, 0.22);
        }

        .xizmat-brand-copy {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.05;
        }

        .xizmat-brand-name {
            color: #191919;
            font-size: 20px;
            font-weight: 800;
            letter-spacing: 0;
            white-space: nowrap;
        }

        .xizmat-brand-tagline {
            margin-top: 4px;
            color: #6A6D76;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
        }

        @media (max-width: 390px) {
            .xizmat-brand {
                gap: 8px;
                width: min(300px, 100%);
                padding-right: 10px;
            }

            .xizmat-brand-mark {
                width: 44px;
                height: 44px;
                flex-basis: 44px;
            }

            .xizmat-brand-name {
                font-size: 18px;
            }

            .xizmat-brand-tagline {
                font-size: 11px;
            }
        }

        body.home-index-page {
            padding-top: calc(82px + env(safe-area-inset-top));
            background: #F7F8FA;
        }

        body.home-index-page header {
            height: calc(82px + env(safe-area-inset-top));
            min-height: calc(82px + env(safe-area-inset-top));
            overflow: visible;
        }

        body.home-index-page .custom-nav {
            height: calc(82px + env(safe-area-inset-top));
            min-height: calc(82px + env(safe-area-inset-top));
            display: flex !important;
            align-items: center;
            padding: env(safe-area-inset-top) 0 8px !important;
        }

        body.home-index-page .custom-nav > .custom-container {
            width: min(100%, 390px);
            max-width: 390px;
            height: auto;
            margin: 0 auto;
            padding: 0 14px;
        }

        body.home-index-page .custom-nav-inner.home-index-nav {
            display: grid !important;
            grid-template-columns: 1fr !important;
            justify-items: center;
            align-items: center;
            width: 100%;
        }

        body.home-index-page .home-index-nav .custom-nav-inner-close,
        body.home-index-page .home-index-nav .custom-nav-inner-cart {
            display: none !important;
        }

        body.home-index-page .home-index-nav .custom-nav-inner-logo {
            grid-column: 1;
            width: 100%;
            margin-left: 0 !important;
            justify-content: center;
        }

        body.home-index-page .xizmat-brand {
            width: min(300px, 100%);
        }

        .app-page-shell {
            opacity: 0;
            transform: translate3d(0, 8px, 0) scale(0.996);
            transition: opacity 220ms ease, transform 280ms cubic-bezier(.22, 1, .36, 1);
            will-change: opacity, transform;
        }

        body.page-ready .app-page-shell {
            opacity: 1;
            transform: none;
            will-change: auto;
        }

        body.page-exiting .app-page-shell {
            opacity: 0.72;
            transform: translate3d(0, 6px, 0) scale(0.992);
            pointer-events: none;
        }

        body.page-exiting .telegram-bottom-nav {
            pointer-events: none;
        }

        body.modal-open .app-page-shell {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
            will-change: auto !important;
            pointer-events: auto !important;
        }

        body.modal-open .modal {
            z-index: 1085 !important;
            pointer-events: auto !important;
        }

        body.modal-open .modal.show .modal-dialog,
        body.modal-open .modal.show .modal-content {
            pointer-events: auto !important;
        }

        body.modal-open .modal-backdrop {
            z-index: 1075 !important;
        }

        @media (prefers-reduced-motion: reduce) {
            .app-page-shell {
                opacity: 1;
                transform: none;
                transition: none;
            }
        }

