/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.phone {
    width: 100%;
    height: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
}

/* ===== SCREENS ===== */
.screen {
    position: absolute;
    inset: 0;
    background: var(--bg);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 1;
}

.screen.active {
    display: flex
}

.scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 110px;
    /* Увеличено чтобы контент не прятался за меню */
}

.scroll-area::-webkit-scrollbar {
    display: none
}

/* ===== TRANSITION ===== */
.screen.slide-in {
    animation: slideIn .3s ease forwards
}

.screen.slide-out {
    animation: slideOut .3s ease forwards
}

@keyframes slideIn {
    from {
        transform: translateX(100%)
    }

    to {
        transform: translateX(0)
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(-30%)
    }
}

/* ===== COLORS — определяются в theme-dark.css / theme-light.css ===== */

/* ===== SPLASH ===== */
#s-splash {
    background: var(--bg-splash);
    justify-content: center;
    align-items: center
}

.splash-logo {
    font-size: 52px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px
}

.splash-logo span {
    color: var(--accent)
}

.splash-tagline {
    color: var(--text2);
    font-size: 14px;
    margin-top: 8px;
    letter-spacing: 2px;
    text-transform: uppercase
}

.splash-anim {
    width: 100%;
    height: 4px;
    background: var(--border2);
    margin-top: 48px;
    overflow: hidden;
    position: relative
}

.splash-anim::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    animation: splashLoad 1.8s ease forwards;
    box-shadow: 0 0 15px var(--accent)
}

@keyframes splashLoad {
    to {
        width: 100%
    }
}

/* Лого со скруглением и паддингом */
.logo-branded {
    border-radius: 20%;
    padding: 10px;
    background: #fff;
}

/* Липкое меню */
.cat-chips-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

/* ===== ONBOARDING ===== */
#s-onboard {
    background: var(--bg4)
}

.onboard-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    flex-shrink: 0
}

.onboard-img-placeholder {
    width: 100%;
    height: 380px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px
}

.onboard-content {
    padding: 32px 28px;
    flex: 1
}

.onboard-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 20px
}

.onboard-dots span {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--border2);
    transition: .3s
}

.onboard-dots span.active {
    width: 24px;
    background: var(--accent)
}

.onboard-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 12px
}

.onboard-title em {
    color: var(--accent);
    font-style: normal
}

.onboard-sub {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.6
}

.onboard-btn {
    margin: 24px 28px 0;
    background: var(--accent);
    color: #fff;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    width: calc(100% - 56px)
}

.onboard-skip {
    text-align: center;
    padding: 16px;
    color: var(--text2);
    font-size: 14px;
    cursor: pointer
}

/* ===== AUTH ===== */
.auth-wrap {
    padding: 60px 28px 32px;
    flex: 1
}

.auth-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px
}

.auth-sub {
    color: var(--text2);
    font-size: 15px;
    margin-bottom: 40px
}

.phone-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1.5px solid var(--border2);
    border-radius: 16px;
    padding: 16px 18px;
    gap: 12px;
    margin-bottom: 16px
}

.phone-code {
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    border-right: 1.5px solid var(--border2);
    padding-right: 12px
}

.phone-input-wrap input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 17px;
    flex: 1;
    font-family: inherit
}

.phone-input-wrap input::placeholder {
    color: var(--border3)
}

.auth-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    height: 56px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    margin-top: auto
}

.auth-legal {
    color: var(--text3);
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
    line-height: 1.6
}

.auth-legal a {
    color: var(--text2)
}

.otp-wrap {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 40px 0
}

.otp-box {
    width: 70px;
    height: 70px;
    background: var(--bg-input);
    border: 1.5px solid var(--border2);
    border-radius: 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    outline: none;
    font-family: inherit
}

.otp-box.filled {
    border-color: var(--accent)
}

.otp-timer {
    text-align: center;
    color: var(--text2);
    font-size: 14px
}

.otp-timer span {
    color: var(--accent)
}

/* ===== TOP BAR ===== */
.topbar {
    padding: 48px 20px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0
}

.topbar-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.5px
}

.topbar-logo span {
    color: var(--accent)
}

.topbar-spacer {
    flex: 1
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--icon-btn-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--text);
    font-size: 18px;
    position: relative;
    flex-shrink: 0
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--icon-btn-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--text);
    font-size: 16px
}

/* ===== MODE SWITCHER ===== */
.mode-bar {
    margin: 0 16px 12px;
    background: var(--bg2);
    border-radius: 14px;
    display: flex;
    padding: 4px;
    gap: 4px
}

.mode-btn {
    flex: 1;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text2);
    border: none;
    background: none;
    gap: 6px;
    transition: .2s
}

.mode-btn.active {
    background: var(--mode-active-bg);
    color: var(--mode-active-color)
}

.mode-btn .disc {
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px
}

/* ===== ADDRESS BAR ===== */
.addr-bar {
    margin: 0 16px 16px;
    background: var(--bg2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer
}

.addr-bar .pin {
    color: var(--accent);
    font-size: 18px
}

.addr-bar .addr-text {
    flex: 1
}

.addr-bar .addr-label {
    font-size: 11px;
    color: var(--text2)
}

.addr-bar .addr-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text)
}

.addr-bar .chevron {
    color: var(--text2)
}

/* ===== BANNERS CAROUSEL ===== */
.banners {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 0;
    scrollbar-width: none;
    margin-top: 12px;
    margin-bottom: 20px;
}

.banners::-webkit-scrollbar {
    display: none
}

.banner-card {
    min-width: 200px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    flex-shrink: 0
}

.banner-card img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.banner-bg1 {
    background: linear-gradient(135deg, #1a1a1a, #2d0a00)
}

.banner-bg2 {
    background: linear-gradient(135deg, #0a1a0a, #1a3a0a)
}

.banner-bg3 {
    background: linear-gradient(135deg, #1a0a2d, #4a0a60)
}

.banner-bg4 {
    background: linear-gradient(135deg, #1a1000, #3a2800)
}

.banner-inner {
    position: absolute;
    inset: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end
}

.banner-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px
}

.banner-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2
}

.banner-emoji {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 36px
}

/* ===== SECTION TITLE ===== */
.section-hd {
    display: flex;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px
}

.section-hd h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    flex: 1
}

.see-all {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer
}

/* ===== CATEGORY CHIPS ===== */
.cat-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    margin-bottom: 16px;
    scrollbar-width: none
}

.cat-chips::-webkit-scrollbar {
    display: none
}

.cat-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg-chip);
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--chip-border);
    white-space: nowrap;
    transition: .2s
}

.cat-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent)
}

.fav-chip-btn {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 107, 53, 0.05) 100%);
    border: 1.5px solid rgba(255, 59, 48, 0.3) !important;
    color: #FF3B30 !important;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.1);
}

.fav-chip-count {
    background: #FF3B30;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 800;
}

/* ===== RESTAURANT CARDS ===== */
.rest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 20px
}

.rest-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer
}

.rest-card-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    position: relative
}

.rest-card-img-ph {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px
}

.rest-card-body {
    padding: 10px
}

.rest-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px
}

.rest-card-meta {
    font-size: 11px;
    color: var(--text2);
    display: flex;
    gap: 8px
}

/* ===== DISH GRID ===== */
.dish-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 20px
}

.dish-card {
    background: var(--bg-card);
    border: var(--dish-card-border-width) solid var(--dish-card-border-color);
    border-radius: var(--dish-card-border-radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dish-img {
    width: 100%;
    height: 135px;
    object-fit: cover;
    display: block
}

.dish-img-ph {
    width: 100%;
    height: 135px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg3);
}

.dish-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase
}

.badge-hit {
    background: #2979ff;
    color: #fff
}

.badge-hot {
    background: var(--accent);
    color: #fff
}

.badge-new {
    background: var(--green);
    color: #fff
}

.dish-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, .5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border: none;
    color: #aaa;
    transition: color 0.2s, transform 0.15s;
    line-height: 1;
}

/* Активное состояние избранного */
.dish-fav.active {
    color: #FF3B30;
}

.dish-fav:active {
    transform: scale(1.3);
}

.dish-body {
    padding: 10px
}

.dish-weight {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 2px
}

.dish-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.dish-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.dish-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--text)
}

.add-btn {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    border: none;
    cursor: pointer
}

.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 4px
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--qty-btn-bg);
    border: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center
}

.qty-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    width: 20px;
    text-align: center
}

/* Счётчик +qty- прямо в карточке блюда */
.card-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg);
    border-radius: 10px;
    padding: 2px;
}

/* ===== BOTTOM NAV ===== */
.bnav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    min-height: 72px;
    background: var(--bg-bnav);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 2000;
    display: none;
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 12px;
    position: relative;
    border: none;
    background: none
}

.bnav-item .bnav-icon {
    font-size: 26px;
    color: var(--bnav-icon-color);
    transition: .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG иконки в нижнем меню */
.bnav-item .bnav-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--bnav-icon-color);
    transition: stroke .2s;
}

.bnav-item .bnav-label {
    font-size: 12px;
    color: var(--bnav-icon-color);
    font-weight: 600;
    transition: .2s
}

.bnav-item.active .bnav-icon,
.bnav-item.active .bnav-label {
    color: var(--accent)
}

/* Активный SVG в нижнем меню */
.bnav-item.active .bnav-icon svg {
    stroke: var(--accent);
}

/* Блок адреса/режима в корзине */
.cart-addr-block {
    flex-shrink: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.bnav-cart {
    background: var(--accent);
    border-radius: 14px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    min-width: 100px;
    justify-content: center
}

.bnav-cart-icon {
    font-size: 22px;
    color: #fff
}

.bnav-cart-sum {
    font-size: 15px;
    font-weight: 700;
    color: #fff
}

/* ===== DISH MODAL ===== */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 3000;
    display: none;
    align-items: flex-end
}

.modal-overlay.open {
    display: flex
}

.modal-sheet {
    background: var(--bg-modal);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
}

.modal-sheet::-webkit-scrollbar {
    display: none
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--modal-close-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--modal-close-color);
    font-size: 16px;
    z-index: 10
}

.modal-hero {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block
}

.modal-hero-ph {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    background: linear-gradient(145deg, var(--bg), var(--bg2));
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.modal-hero-ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-body {
    padding: 20px 20px 100px;
    background: var(--bg-modal);
    position: relative;
    z-index: 2;
}

.modal-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 10px
}

.modal-tags .dish-badge {
    position: static;
}

.modal-name-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.modal-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.modal-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 14px
}

.modal-nutrition {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px
}

.nutr-pill {
    background: var(--bg2);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text2)
}

.nutr-pill span {
    color: #fff;
    font-weight: 600
}

/* ===== MODIFIERS ===== */
.mods-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px
}

.mod-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border)
}

.mod-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border3);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    flex-shrink: 0
}

.mod-check.on {
    background: var(--accent);
    border-color: var(--accent)
}

.mod-label {
    flex: 1;
    font-size: 13px;
    color: var(--text)
}

.mod-price {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600
}

/* ===== FREE ADDONS ===== */
.free-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px
}

.free-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #333;
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
    transition: .2s
}

.free-chip.on {
    border-color: var(--accent);
    color: var(--accent)
}

/* ===== UPSELL STRIP ===== */
.upsell {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 8px;
    scrollbar-width: none
}

.upsell::-webkit-scrollbar {
    display: none
}

.upsell-card {
    min-width: 110px;
    background: #252525;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer
}

.upsell-img {
    width: 100%;
    height: 80px;
    object-fit: cover
}

.upsell-img-ph {
    width: 100%;
    height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
}

.upsell-info {
    padding: 8px
}

.upsell-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px
}

.upsell-price {
    font-size: 12px;
    color: var(--accent);
    font-weight: 700
}

/* ===== MODAL FOOTER ===== */
.modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-modal);
    padding: 16px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border)
}

.modal-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg3);
    border-radius: 14px;
    padding: 12px 14px
}

.modal-add-btn {
    flex: 1;
    background: var(--accent);
    color: #fff;
    border-radius: 14px;
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer
}

/* ===== CART ===== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.cart-item:active {
    background: var(--bg2);
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0
}

.cart-item-img-ph {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1C1C1C;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px
}

.cart-item-sub {
    font-size: 12px;
    color: var(--text2)
}

.cart-item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin: 4px 0 10px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 8px
}

.progress-bar-wrap {
    margin: 0 16px 16px;
    background: var(--bg2);
    border-radius: 12px;
    padding: 12px 14px
}

.progress-label {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 8px
}

.progress-label span {
    color: #fff;
    font-weight: 600
}

.progress-track {
    background: var(--progress-bg);
    border-radius: 4px;
    height: 6px
}

.progress-fill {
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width .5s ease
}

/* Анимация скрытия элементов при фокусе на вводе телефона */
.auth-typing-hide {
    transition: all 0.3s ease;
    opacity: 1;
    max-height: 200px;
    overflow: hidden;
}

#s-onboard.is-typing .auth-typing-hide {
    opacity: 0;
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#s-onboard.is-typing .onboard-content {
    padding-top: 20px !important;
}

.auth-typing-show {
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0 !important;
}

#s-onboard.is-typing .auth-typing-show {
    opacity: 1;
    max-height: 50px;
    margin-bottom: 12px !important;
}


.promo-row {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg2);
    margin: 16px;
    border-radius: 16px;
    gap: 12px;
    cursor: pointer;
    border: 1px dashed var(--border);
}

.promo-row:active {
    transform: scale(0.98);
}

.promo-row .promo-icon {
    font-size: 22px;
}

.promo-text {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.promo-row .promo-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #fff
}

.cart-totals {
    padding: 0 16px;
    margin-bottom: 16px
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text2)
}

.cart-total-row.main {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    border-top: 1px solid var(--cart-border);
    margin-top: 6px;
    padding-top: 14px
}

.cart-cta {
    margin: 0 16px 20px;
    background: var(--accent);
    border-radius: 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    cursor: pointer;
    border: none;
    width: calc(100% - 32px)
}

.cart-cta span {
    font-size: 17px;
    font-weight: 700;
    color: #fff
}

.cart-cta .cta-sum {
    font-size: 17px;
    font-weight: 800;
    color: #fff
}

/* ===== MAP SCREEN ===== */
.map-area {
    background: var(--bg-map);
    height: 320px;
    position: relative;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 40px 40px
}

.map-road-h {
    position: absolute;
    height: 8px;
    background: rgba(255, 200, 0, .15);
    left: 0;
    right: 0
}

.map-road-v {
    position: absolute;
    width: 8px;
    background: rgba(255, 200, 0, .15);
    top: 0;
    bottom: 0
}

.map-pin {
    position: absolute;
    font-size: 28px;
    transform: translate(-50%, -100%);
    cursor: pointer
}

.map-my {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #4a90e2;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 8px rgba(74, 144, 226, .2)
}

.map-bottom {
    background: #1C1C1C;
    border-radius: 24px 24px 0 0;
    padding: 20px
}

.map-rest-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 14px;
    scrollbar-width: none
}

.map-rest-tag {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #252525;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer
}

.map-rest-tag.active {
    border: 1.5px solid var(--accent)
}

.map-find-btn {
    width: 100%;
    background: #2a2a2a;
    border-radius: 14px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    cursor: pointer;
    border: none;
    color: #fff;
    font-size: 14px
}

/* ===== CHECKOUT ===== */
.map-checkout {
    height: 240px;
    background: linear-gradient(180deg, #1a2a1a, #0d1a0d);
    position: relative;
    overflow: hidden;
    flex-shrink: 0
}

.delivery-time-chip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 1px solid #333
}

.checkout-sheet {
    background: #111;
    border-radius: 24px 24px 0 0;
    padding: 20px;
    flex: 1;
    overflow-y: auto
}

.checkout-tabs {
    display: flex;
    background: #1C1C1C;
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px
}

.checkout-tab {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    background: none;
    color: var(--text2);
    cursor: pointer;
    transition: .2s
}

.checkout-tab.active {
    background: #fff;
    color: #111
}

.addr-field {
    margin-bottom: 12px
}

.addr-field label {
    font-size: 11px;
    color: var(--text2);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px
}

.addr-field input {
    width: 100%;
    background: #1C1C1C;
    border: 1.5px solid #2a2a2a;
    border-radius: 12px;
    padding: 13px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    font-family: inherit
}

.addr-field input:focus {
    border-color: var(--accent)
}

.addr-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px
}

.checkout-continue {
    width: 100%;
    background: var(--accent);
    color: #fff;
    height: 54px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 16px
}

/* ===== PAYMENT ===== */
.styled-input {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: 0.2s;
}

.styled-input:focus {
    border-color: var(--accent);
}

.styled-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: .2s
}

.pay-method.selected {
    border-color: var(--accent)
}

.pay-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0
}

.pay-icon.orange {
    background: rgba(255, 59, 48, .15)
}

.pay-icon.blue {
    background: rgba(41, 121, 255, .15)
}

.pay-icon.green {
    background: rgba(76, 175, 80, .15)
}

.pay-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--pay-name-color);
    flex: 1
}

.pay-radio {
    width: 22px;
    height: 22px;
    border-radius: 11px;
    border: 2px solid var(--border3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s
}

.pay-radio.on {
    border-color: var(--accent);
    background: var(--accent)
}

.pay-radio.on::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #fff;
    margin: auto
}

.phone-input-wrap input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 20px;
    flex: 1;
    font-family: 'Nunito', monospace;
    letter-spacing: 2px
}

.phone-input-wrap input::placeholder {
    color: var(--border3);
    font-size: 16px;
    letter-spacing: 1px
}

.pay-radio.on::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #fff
}

.order-summary-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text2)
}

.order-summary-row.total {
    color: var(--text);
    font-weight: 800;
    font-size: 16px;
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 12px
}

/* ===== ORDER CONFIRMED ===== */
#s-confirmed {
    justify-content: center;
    align-items: center;
    padding: 32px
}

.confirmed-anim {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounce .6s ease
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.2)
    }
}

.confirmed-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    margin-bottom: 8px
}

.confirmed-sub {
    font-size: 15px;
    color: var(--text2);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6
}

.confirmed-num {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    width: 100%;
    margin-bottom: 24px;
    text-align: center;
}

.confirmed-num .num {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent)
}

.confirmed-num .eta {
    font-size: 13px;
    color: var(--text2);
    margin-top: 4px
}

.confirmed-btns {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.btn-primary {
    width: 100%;
    height: 54px;
    background: var(--accent);
    color: #fff;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer
}

.btn-secondary {
    width: 100%;
    height: 54px;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer
}

/* ===== TRACKING ===== */
.status-strip {
    display: flex;
    padding: 24px 16px;
    align-items: flex-start;
    justify-content: space-between;
    background: var(--status-strip-bg);
}

.status-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.status-line {
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 3px;
    background: var(--border2);
    z-index: 5;
}

.status-line.done {
    background: var(--accent);
}

.status-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: .3s;
    z-index: 10;
    border: 1px solid var(--border);
}

.status-dot.done {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 59, 48, 0.3);
}

.status-dot.active {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.5);
    border: 3px solid rgba(255, 59, 48, 0.2);
    margin: -6px 0;
    /* Компенсация размера чтобы не прыгала полоска */
}

.status-label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    white-space: nowrap;
}

.status-label.active {
    color: var(--accent);
}

.status-label.done {
    color: #555;
}

/* Big ETA Card */
.track-main-card {
    margin: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.track-main-eta {
    font-size: 48px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.track-main-status {
    font-size: 16px;
    color: #888;
    font-weight: 500;
}

.status-label.done {
    color: #555;
}

.courier-card {
    margin: 0 16px 16px;
    background: #1C1C1C;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px
}

.courier-avatar {
    width: 52px;
    height: 52px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent), #FF6B35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0
}

.courier-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff
}

.courier-rating {
    font-size: 12px;
    color: var(--text2);
    margin-top: 2px
}

.courier-btns {
    margin-left: auto;
    display: flex;
    gap: 8px
}

.courier-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #252525;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    border: none
}

.track-eta {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 16px
}

.eta-card {
    flex: 1;
    background: #1C1C1C;
    border-radius: 14px;
    padding: 14px;
    text-align: center
}

.eta-card .eta-val {
    font-size: 22px;
    font-weight: 800;
    color: #fff
}

.eta-card .eta-label {
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px
}

/* ===== PROFILE ===== */
.profile-hero {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--accent), #FF6B35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text)
}

.profile-phone {
    font-size: 13px;
    color: var(--text2);
    margin-top: 2px
}

.loyalty-card {
    margin: 0 16px 20px;
    border-radius: 20px;
    padding: 20px;
    overflow: hidden;
    position: relative;
    min-height: 120px
}

.loyalty-bg1 {
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a)
}

.loyalty-bg2 {
    background: linear-gradient(135deg, #c0a060, #a08040)
}

.loyalty-bg3 {
    background: linear-gradient(135deg, #607090, #405070)
}

.loyalty-level {
    font-size: 20px;
    font-weight: 800;
    color: #fff
}

.loyalty-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    margin-top: 2px
}

.loyalty-points {
    position: absolute;
    top: 20px;
    right: 20px;
    text-align: right
}

.loyalty-points .pts {
    font-size: 24px;
    font-weight: 900;
    color: #fff
}

.loyalty-points .pts-label {
    font-size: 10px;
    color: rgba(255, 255, 255, .6)
}

.loyalty-progress {
    margin-top: 16px
}

.loyalty-progress-track {
    background: rgba(255, 255, 255, .2);
    border-radius: 4px;
    height: 6px
}

.loyalty-progress-fill {
    height: 6px;
    border-radius: 4px;
    background: #fff
}

.loyalty-progress-text {
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
    margin-top: 6px
}

.profile-menu {
    padding: 0 16px;
    margin-bottom: 20px
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--cart-border);
    cursor: pointer
}

.profile-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px
}

.profile-item-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text)
}

.profile-item-chevron {
    color: #444
}

/* ===== PROMOTIONS ===== */
.promo-card {
    margin: 0 16px 16px;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer
}

.promo-banner {
    width: 100%;
    height: 160px;
    object-fit: cover
}

.promo-banner-ph {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px
}

.promo-info {
    background: var(--bg-card);
    padding: 16px
}

.promo-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px
}

.promo-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 12px
}

.promo-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg3);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px
}

.promo-code-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
    flex: 1
}

.copy-btn {
    padding: 6px 14px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none
}

.promo-apply-btn {
    width: 100%;
    background: #252525;
    color: #fff;
    height: 46px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer
}

/* ===== NOTIFICATIONS ===== */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--cart-border)
}

.notif-item.unread {
    background: var(--bg2)
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px
}

.notif-content {
    flex: 1
}

.notif-date {
    font-size: 11px;
    color: var(--text2);
    margin-bottom: 4px
}

.notif-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px
}

.notif-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5
}

/* ===== REVIEWS ===== */
.review-card {
    margin: 0 16px 14px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px
}

.review-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px
}

.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff
}

.review-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    flex: 1
}

.review-date {
    font-size: 11px;
    color: var(--text2)
}

.review-stars {
    color: var(--gold);
    font-size: 13px;
    margin-bottom: 6px
}

.review-text {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 10px
}

.review-reply {
    background: var(--bg3);
    border-radius: 10px;
    padding: 10px 12px
}

.review-reply-from {
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px
}

.review-reply-text {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5
}

/* ===== ORDER HISTORY ===== */
.order-card {
    margin: 0 16px 12px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px
}

.order-card-hd {
    display: flex;
    align-items: center;
    margin-bottom: 10px
}

.order-num {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    flex: 1
}

.order-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700
}

.status-done {
    background: rgba(76, 175, 80, .2);
    color: var(--green)
}

.status-cancelled {
    background: rgba(255, 59, 48, .2);
    color: var(--accent)
}

.order-meta {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 10px
}

.order-items {
    font-size: 13px;
    color: #fff;
    margin-bottom: 10px
}

.order-footer {
    display: flex;
    align-items: center;
    gap: 8px
}

.order-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    flex: 1
}

.order-repeat-btn {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer
}

/* ===== DRAWER ===== */
.drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 3100;
    display: none
}

.drawer-overlay.open {
    display: block
}

.drawer {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-drawer);
    z-index: 3101;
    padding: 60px 0 20px;
    transform: translateX(-100%);
    transition: .3s;
    display: flex;
    flex-direction: column
}

.drawer.open {
    transform: translateX(0)
}

.drawer-logo {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    padding: 0 24px 24px;
    letter-spacing: -1px
}

.drawer-logo span {
    color: var(--accent)
}

.drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    cursor: pointer;
    transition: .1s
}

.drawer-item:hover {
    background: var(--bg2)
}

.drawer-item-icon {
    font-size: 20px;
    width: 24px;
    text-align: center
}

.drawer-item-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text)
}

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 24px
}

.drawer-socials {
    display: flex;
    gap: 12px;
    padding: 20px 24px 0
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer
}

/* ===== RATING SCREEN ===== */
.stars-rating {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0
}

.star-btn {
    font-size: 40px;
    cursor: pointer;
    opacity: .3;
    transition: .2s
}

.star-btn.active {
    opacity: 1
}

.rating-textarea {
    width: 100%;
    background: var(--bg2);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    resize: none;
    height: 100px;
    margin-bottom: 16px
}

/* ===== ADDRESS SELECTION ===== */
.addr-map-area {
    flex: 1;
    background: linear-gradient(180deg, #1e2e1e 0%, #111a11 100%);
    position: relative;
    overflow: hidden;
    min-height: 300px
}

.addr-map-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    font-size: 40px;
    animation: pinBounce 1s ease infinite alternate
}

@keyframes pinBounce {
    from {
        transform: translate(-50%, -100%)
    }

    to {
        transform: translate(-50%, -110%)
    }
}

.addr-bottom {
    background: var(--addr-bottom-bg);
    border-radius: 24px 24px 0 0;
    padding: 20px;
    flex-shrink: 0
}

/* ===== MISC ===== */
.divider {
    height: 8px;
    background: #0d0d0d;
    flex-shrink: 0
}

.pg-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text)
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    text-align: center
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px
}

.empty-sub {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6
}

/* ===== GIFTS BUTTON & MODAL ===== */
.gifts-btn {
    width: 100%;
    background: var(--bg3);
    border: 1.5px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: border-glow 2.5s infinite alternate ease-in-out;
}

@keyframes border-glow {
    0% {
        border-color: rgba(255, 59, 48, 0.2);
        box-shadow: 0 4px 12px rgba(255, 59, 48, 0.05);
    }

    100% {
        border-color: rgba(255, 59, 48, 0.7);
        box-shadow: 0 0 16px rgba(255, 59, 48, 0.3);
    }
}

.gifts-btn:hover {
    background: #2a2a2a;
}


.gifts-btn:active {
    transform: scale(0.98);
}

.gifts-btn-icon {
    font-size: 20px;
}

.gifts-btn-text {
    flex: 1;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
}

.gifts-btn-badge {
    background: #FF3B30;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.gifts-btn-chevron {
    color: #555;
    font-size: 18px;
}

.gifts-sheet,
.profile-sheet {
    background: var(--bg-sheet);
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.gifts-header {
    padding: 24px 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.gifts-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gifts-icon-main {
    font-size: 24px;
}

.gifts-title-text {
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.modal-close-minimal {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--close-minimal-bg);
    border: none;
    color: var(--close-minimal-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gifts-content-scroll {
    padding: 20px 16px;
}

.gifts-section-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--gifts-section-color);
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.gift-progress-card {
    background: var(--bg2);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.gift-item-row {
    display: flex;
    align-items: center;
}

.gift-item-icon-ph {
    width: 44px;
    height: 44px;
    background: var(--bg3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.gift-item-info {
    flex: 1;
}

.gift-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.gift-item-sub {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.gift-progress-track {
    width: 100%;
    height: 6px;
    background: var(--bg3);
    border-radius: 3px;
    overflow: hidden;
}

.gift-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.gift-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #333;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: transparent;
}

.gift-check.done {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.gift-check.done::before {
    content: '✓';
}

.gift-piggy-card {
    background: var(--bg2);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid var(--border);
}

.piggy-progress-row {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    margin-bottom: 8px;
}

.piggy-label {
    font-size: 13px;
    color: #999;
}

.piggy-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.piggy-hint {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* ===== ACTIVE CART HIGHLIGHT IN BNAV ===== */
.bnav-item.has-items .bnav-icon {
    color: var(--accent);
    transform: scale(1.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bnav-item.has-items .bnav-icon::after {
    display: none;
}

@keyframes pulse-border {
    0% {
        transform: scale(1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.bnav-item.has-items .bnav-label {
    color: var(--bnav-icon-color);
    font-weight: 800;
}

/* ===== STICKY GIFTS WRAPPER ===== */
.gifts-sticky-footer {
    position: absolute;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    padding: 10px 16px;
    background: linear-gradient(to top, var(--bg) 80%, transparent);
    z-index: 1999;
    pointer-events: none;
    display: none;
}

.gifts-sticky-footer button {
    pointer-events: auto;
}

/* ===== КНОПКА БОНУСОВ В ШАПКЕ ===== */
.bonus-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.05));
    border: 1.5px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 20px;
    padding: 7px 14px 7px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bonus-btn:active {
    transform: scale(0.96);
}

.bonus-coin {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.4);
}

.bonus-amount {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

/* ===== ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ ===== */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--icon-btn-bg);
    border: none;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.theme-toggle:active {
    transform: scale(0.9);
}

.theme-toggle .t-icon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

body[data-theme="dark"] .theme-toggle .t-sun {
    opacity: 1;
    transform: rotate(0deg);
}

body[data-theme="dark"] .theme-toggle .t-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

body[data-theme="light"] .theme-toggle .t-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

body[data-theme="light"] .theme-toggle .t-moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* ===== МОДАЛКА БОНУСОВ ===== */
#bonus-modal {
    z-index: 4000;
}

.bonus-sheet {
    background: var(--bg-sheet);
    border-radius: 28px 28px 0 0;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}

.bonus-sheet-header {
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
}

.bonus-header-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
    flex-shrink: 0;
}

.bonus-header-info {
    flex: 1;
}

.bonus-header-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.bonus-header-amount {
    font-size: 30px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1;
}

.bonus-header-amount em {
    color: var(--accent);
    font-style: normal;
}

.bonus-sheet-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--close-minimal-bg);
    border: none;
    color: var(--close-minimal-color);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bonus-body {
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bonus-info-card {
    background: var(--bg2);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.bonus-info-emoji {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.bonus-info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.bonus-info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.bonus-info-value.accent {
    color: var(--accent);
    font-size: 16px;
}

.bonus-highlight-card {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.03));
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    border-radius: 18px;
    padding: 16px 20px;
    text-align: center;
}

.bonus-highlight-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    margin: 4px 0;
}

.bonus-highlight-sub {
    font-size: 12px;
    color: var(--text2);
    line-height: 1.5;
}

/* Светлая тема: корректировки inputs */
body[data-theme="light"] .addr-field input,
body[data-theme="light"] .styled-input {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
}

body[data-theme="light"] .styled-input option {
    background: var(--bg-input);
    color: var(--text);
}

body[data-theme="light"] .checkout-sheet {
    background: var(--bg);
}

.divider {
    height: 8px;
    background: var(--divider-bg);
    flex-shrink: 0;
}