/* General Body & Fonts */
:root {
    --emenu-primary: #d9614c;
    --emenu-primary-dark: #c8513d;
    --emenu-primary-darker: #b54836;
    --emenu-primary-light: #e87762;
    --emenu-primary-lighter: #fff5f2;
    --emenu-primary-soft-bg: #fff7f5;
    --emenu-primary-rgb: 217, 97, 76;
    --emenu-primary-gradient: linear-gradient(135deg, #e87762 0%, #d9614c 55%, #c8513d 100%);
    --emenu-ui-bg: #f8eee9;
    --emenu-ui-surface: #ffffff;
    --emenu-ui-text: #333333;
    --emenu-ui-muted: #6b7280;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8eee9;
}

.btn-primary,
.bg-primary {
    background: var(--emenu-primary-gradient) !important;
    border-color: var(--emenu-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    border-color: var(--emenu-primary-dark) !important;
}

.text-primary {
    color: var(--emenu-primary) !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--emenu-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--emenu-primary-rgb), 0.2) !important;
}

.form-check-input:checked {
    background-color: var(--emenu-primary) !important;
    border-color: var(--emenu-primary) !important;
}

[data-emenu-button-style="solid"] .emenu-cta-btn {
    background: var(--emenu-primary) !important;
}

[data-emenu-button-style="soft"] .emenu-cta-btn {
    background: var(--emenu-primary-soft-bg) !important;
    color: var(--emenu-primary) !important;
    box-shadow: 0 6px 14px rgba(var(--emenu-primary-rgb), 0.2) !important;
}

[data-emenu-button-style="outline"] .emenu-cta-btn {
    background: #fff !important;
    border: 1px solid var(--emenu-primary) !important;
    color: var(--emenu-primary) !important;
    box-shadow: 0 4px 10px rgba(var(--emenu-primary-rgb), 0.14) !important;
}

[data-emenu-button-style="outline"] .emenu-cta-btn .emenu-cta-btn__icon,
[data-emenu-button-style="soft"] .emenu-cta-btn .emenu-cta-btn__icon {
    color: currentColor !important;
}

.logo,
.emenu-footer-link,
.promo-badge,
.promo-icon,
.category-item.active .category-name,
#user-info .dropdown-item i,
.search-result-price,
#addItemModal #addItemPrice,
.cart-addon-price,
.admin-page .admin-order-amount {
    color: var(--emenu-primary) !important;
}

.logo {
    background: linear-gradient(to right, var(--emenu-primary), var(--emenu-primary-darker));
}

.category-item.active,
#orders-history-modal .order-repeat-btn,
#cart-items-container .decrease-btn,
#cart-items-container .increase-btn,
.admin-page .admin-order-status-btn.active,
.admin-page .admin-side-link.active {
    border-color: var(--emenu-primary) !important;
}

.admin-page .admin-side-link.active,
.admin-page .admin-order-status-btn.active,
#cart-modal #checkout-btn,
#cart-continue-btn,
#header-cart-count,
.scroll-to-top-btn,
.popular-tag {
    background: var(--emenu-primary-gradient) !important;
    box-shadow: 0 8px 18px rgba(var(--emenu-primary-rgb), 0.25) !important;
}

.admin-page .admin-side-link:hover,
.admin-page .admin-order-status-btn:hover,
#user-info .dropdown-item:hover,
#user-info .dropdown-item:focus {
    color: var(--emenu-primary) !important;
    background: var(--emenu-primary-lighter) !important;
}

.app-preloader {
    --coffee-fill: 12%;
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8eee9;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.coffee-preloader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.coffee-steam-wrap {
    position: relative;
    width: 70px;
    height: 46px;
    margin-bottom: -6px;
}

.coffee-steam {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(to top, rgba(122, 66, 43, 0.2), rgba(122, 66, 43, 0.78));
    filter: blur(0.15px);
    box-shadow: 0 0 10px rgba(122, 66, 43, 0.28);
    animation: coffeeSteam 1.9s ease-in-out infinite;
    transform-origin: bottom center;
}

.coffee-steam.s1 {
    left: 10px;
    animation-delay: 0s;
}

.coffee-steam.s2 {
    left: 30px;
    animation-delay: 0.35s;
}

.coffee-steam.s3 {
    left: 50px;
    animation-delay: 0.7s;
}

.coffee-cup-wrap {
    position: relative;
    width: 120px;
    height: 90px;
}

.coffee-cup {
    position: absolute;
    left: 18px;
    top: 8px;
    width: 74px;
    height: 52px;
    border: 4px solid #d9614c;
    border-bottom: 6px solid #c8513d;
    border-radius: 0 0 30px 30px;
    background: #fff7f3;
    overflow: hidden;
    z-index: 2;
}

.coffee-cup-handle {
    position: absolute;
    left: 89px;
    top: 15px;
    width: 25px;
    height: 28px;
    border: 4px solid #d9614c;
    border-left: 0;
    border-radius: 0 16px 16px 0;
    background: rgba(255, 247, 243, 0.6);
    z-index: 1;
}

.coffee-liquid {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(10%, var(--coffee-fill), 88%);
    background: linear-gradient(
        180deg,
        rgba(181, 114, 81, 0.92) 0%,
        rgba(155, 91, 61, 0.9) 28%,
        rgba(128, 70, 47, 0.94) 64%,
        rgba(112, 58, 38, 0.98) 100%
    );
    transition: height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
    filter: saturate(0.98);
}

.coffee-liquid::before {
    content: '';
    position: absolute;
    left: -6%;
    top: -7px;
    width: 112%;
    height: 14px;
    border-radius: 999px;
    background: radial-gradient(
        120% 100% at 50% 45%,
        rgba(206, 139, 104, 0.82) 0%,
        rgba(176, 106, 74, 0.58) 55%,
        rgba(150, 87, 58, 0.22) 100%
    );
    filter: blur(0.8px);
    animation: coffeeWave 2.2s ease-in-out infinite;
}

.coffee-liquid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.04) 26%,
        rgba(0, 0, 0, 0.08) 100%
    );
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.coffee-saucer {
    position: absolute;
    left: 10px;
    bottom: 8px;
    width: 92px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f3b19f 0%, #d9614c 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

@keyframes coffeeSteam {
    0% {
        opacity: 0;
        transform: translateY(8px) scaleY(0.8);
    }
    25% {
        opacity: 0.7;
    }
    70% {
        opacity: 0.45;
    }
    100% {
        opacity: 0;
        transform: translateY(-14px) scaleY(1.12);
    }
}

@keyframes coffeeWave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(1px);
    }
}

.site-main {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.main-banner-section {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eceff5;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}
.banner-carousel-inner {
    background: #111827;
}
.banner-image {
    height: clamp(360px, 52vw, 660px);
    object-fit: cover;
    filter: brightness(0.75);
}

.main-banner-section .carousel-indicators {
    right: 1rem;
    left: auto;
    top: 50%;
    bottom: auto;
    margin-right: 0;
    margin-left: 0;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 0.45rem;
}

.main-banner-section .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    border: 0;
    background-color: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

.main-banner-section .carousel-indicators .active {
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(217, 97, 76, 0.75);
}
.banner-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(217, 97, 76, 0.95);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.banner-chip-new {
    background: rgba(22, 163, 74, 0.95);
}
.main-banner-section .carousel-caption {
    left: 6%;
    right: 6%;
    top: 0;
    bottom: 0;
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    max-width: 560px;
}
.main-banner-section .carousel-caption h5 {
    font-size: clamp(18px, 2.4vw, 28px);
    font-weight: 800;
}
.main-banner-section .carousel-caption p {
    font-size: clamp(12px, 1.5vw, 15px);
}


/* Стили для модального окна профиля */
#profile-avatar {
    border: 3px solid #D9614C;
}


.logo {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to right, #D9614C, #8B4513);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 800;
    letter-spacing: 1px;
    position: relative;
}

.venue-logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}


/* Ensure proper centering and text alignment for header icons */
#header-cart-container,
#telegram-auth-container,
#user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Fix for user avatar dropdown toggle */
.user-avatar.dropdown-toggle {
    outline: none;
    padding: 0 !important;
}

.user-avatar.dropdown-toggle:focus {
    outline: none;
    box-shadow: none;
}
.user-avatar.dropdown-toggle::after {
    display: none !important;
}
#user-info .dropdown {
    display: flex;
    align-items: center;
    justify-content: center;
}

#telegram-login-btn {
    background: linear-gradient(145deg, #fff6f2 0%, #ffe7df 100%);
    border: 1px solid #f3c9bb;
    box-shadow: 0 6px 14px rgba(217, 97, 76, 0.2);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#telegram-login-btn i {
    color: #d9614c;
    font-size: 1rem;
}

#telegram-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 9px 18px rgba(217, 97, 76, 0.28);
    filter: saturate(1.02);
}

#telegram-auth-container .auth-entry-label {
    font-size: 0.75rem;
    color: #8b3f30;
    font-weight: 600;
}

.promo-strip .promo-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eceff5;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    padding: 12px;
}
.promo-card-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(120deg, #fff5f2 0%, #fff 100%);
}
.promo-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #d9614c;
    background: #ffe8e2;
    padding: 3px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.promo-badge-new {
    color: #0c8f4d;
    background: #e8fff1;
}
.promo-title {
    font-size: 18px;
    font-weight: 800;
}
.promo-text {
    font-size: 13px;
    color: #6b7280;
}
.promo-icon {
    font-size: 30px;
    color: #d9614c;
}
.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.promo-mini-title {
    font-size: 13px;
    font-weight: 600;
    color: #394150;
}

.profile-orders-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #eceff5;
    border-radius: 12px;
    padding: 8px;
    background: #fcfcfe;
}
.profile-order-item {
    border: 1px solid #eceff5;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}
.profile-order-item:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .main-banner-section .carousel-caption {
        left: 5%;
        right: 5%;
        max-width: unset;
    }
    .banner-image {
        height: 390px;
    }

    .main-banner-section .carousel-indicators {
        right: 0.6rem;
        gap: 0.35rem;
    }

    .main-banner-section .carousel-indicators [data-bs-target] {
        width: 9px;
        height: 9px;
    }
}

/* Ensure proper spacing for header elements */
.header-top .d-flex.align-items-center > div {
    margin-right: 1rem;
}

.header-top .d-flex.align-items-center > div:last-child {
    margin-right: 0;
}


#header-cart-icon {
    color: #666;
    font-size: 1.5rem;
}

#header-cart-icon:hover {
    color: #D9614C;
}

#header-cart-count {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    background-color: #D9614C;
}

.comment-textarea {
    font-size: 0.8rem;
    resize: vertical;
    min-height: 38px;
}

.comment-textarea:focus {
    border-color: #D9614C;
    box-shadow: 0 0 0 0.2rem rgba(217, 97, 76, 0.25);
}

.cart-order-fields .form-control:focus {
    border-color: #D9614C;
    box-shadow: 0 0 0 0.2rem rgba(217, 97, 76, 0.25);
}

.order-card {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease-in-out;
}

.order-card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.order-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.order-status.pending { background-color: #fff3cd; color: #856404; }
.order-status.confirmed { background-color: #d1ecf1; color: #0c5460; }
.order-status.preparing { background-color: #cce7ff; color: #004085; }
.order-status.ready { background-color: #d4edda; color: #155724; }
.order-status.delivered { background-color: #d4edda; color: #155724; }
.order-status.cancelled { background-color: #f8d7da; color: #721c24; }

.order-item {
    padding: 0.5rem 0;
    border-bottom: 1px dashed #e9ecef;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Add these styles to emenu.css */

/* Order history pagination */
.order-history-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.25rem;
}

.order-history-pagination .page-item {
    margin: 0 0.1rem;
}

.order-history-pagination .page-link {
    border-radius: 0.5rem !important;
    border: 1px solid #dee2e6;
    color: #666;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    transition: all 0.2s ease-in-out;
}

.order-history-pagination .page-link:hover {
    background-color: #f8f9fa;
    color: #D9614C;
    border-color: #D9614C;
}

.order-history-pagination .page-item.active .page-link {
    background-color: #D9614C;
    border-color: #D9614C;
    color: white;
}

.order-history-pagination .page-item.disabled .page-link {
    color: #ccc;
    cursor: not-allowed;
}

.order-history-pagination .page-link:focus {
    box-shadow: none;
}

/* Order history item details */
.order-item-details {
    font-size: 0.78rem;
    gap: 0.5rem;
}

.order-item-details .item-name {
    font-size: 0.82rem;
    line-height: 1.25;
    word-break: break-word;
}

.order-item-details .item-price {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-item-details .item-left {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.order-item-details .item-qty {
    font-size: 0.78rem;
    color: #6b7280;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Add these styles to emenu.css */

/* Full height order history modal */
.modal-fullscreen-responsive {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.modal-fullscreen-responsive .modal-dialog {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 1rem);
    margin: 0.5rem;
    max-width: none;
}

.modal-fullscreen-responsive .modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    border: none;
}

.modal-fullscreen-responsive .modal-header {
    flex-shrink: 0;
}

.modal-fullscreen-responsive .modal-body {
    flex: 1;
    overflow-y: auto;
}

.modal-fullscreen-responsive .modal-footer {
    flex-shrink: 0;
}

/* Empty state for order history */
.order-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.order-history-empty i {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 1.5rem;
}

.order-history-empty h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.order-history-empty p {
    color: #adb5bd;
    max-width: 300px;
}


/* Стили для сканера QR */
.qr-scan-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.scan-overlay {
    pointer-events: none;
}

.btn-danger {
    background-color: #D9614C;
    border-color: #D9614C;
}

.btn-danger:hover {
    background-color: #c04a3a;
    border-color: #c04a3a;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.qr-placeholder:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qr-placeholder i {
    transition: transform 0.3s, color 0.3s;
}

.qr-placeholder:hover i {
    transform: scale(1.1);
    color: #D9614C;
}

/* Добавим эти стили для видео-контейнера */
#video-container {
    position: relative;
    width: 100%;
    height: 300px; /* Фиксированная высота для контейнера */
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

#qr-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px solid #D9614C;
    border-radius: 12px;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.scan-line {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 4px;
    background: #D9614C;
    animation: scanLine 2s infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0% { top: 15%; }
    100% { top: 85%; }
}

/* Spinner */
.spinner-custom {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #D9614C; /* Accent color */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
.header-top {
    background-color: #fff;
    padding: 0.5rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid #F0F0F0;
}

.header-meta-row {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.35rem;
    padding-bottom: 0.1rem;
}

.mobile-menu-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-header-menu {
    width: min(86vw, 320px);
    top: 0 !important;
    height: 100vh !important;
    border-right: 0;
    border-top: 4px solid #d9614c;
    box-shadow: 14px 0 34px rgba(15, 23, 42, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.mobile-header-menu .offcanvas-header {
    border-bottom: 1px solid #eef2f7;
    padding: 0.95rem 1rem;
}

.mobile-header-menu .offcanvas-title {
    color: #1f2937;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.mobile-header-menu .btn-close {
    opacity: 0.65;
}

.mobile-header-menu .offcanvas-body {
    padding: 1rem;
}

.mobile-meta-info {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    color: #374151;
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
}

.mobile-header-menu .btn {
    min-height: 40px;
    border-radius: 0.75rem !important;
    border-color: #e2e8f0;
    color: #374151;
    background: #fff;
    font-weight: 600;
}

.mobile-header-menu .btn:hover,
.mobile-header-menu .btn:focus {
    border-color: #d9614c;
    color: #d9614c;
    background: #fff7f5;
}

.header-contact-btn {
    min-height: 34px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.emenu-footer {
    border-top: 1px solid #f0e6e2;
    background: rgba(255, 255, 255, 0.92);
}

.emenu-footer-link {
    color: #d9614c;
    text-decoration: none;
    font-weight: 600;
}

.emenu-footer-link:hover {
    color: #b54836;
    text-decoration: underline;
}

.search-input {
    border-radius: 0.75rem;
    background-color: #F5F5F5;
    border: none;
    padding-left: 2.5rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.7rem;
}
.search-input::placeholder {
    color: #AAA;
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

/* Banner Carousel */
.carousel-item img {
    height: 100px; /* Adjust height as needed */
    object-fit: cover;
}

/* Sticky 'Our Menu' Section */
.our-menu-sticky-section {
    position: sticky;
    top: 72px;
    background-color: #FAFAFA;
    z-index: 1010;
    padding: 0.3rem 0 0.3rem;
    border-bottom: 1px solid #efe7e4;
    border-radius: 14px;
    overflow: hidden;
    --category-scroll-progress: 0%;
    --category-scroll-active-opacity: 0.25;
}

.our-menu-sticky-section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    pointer-events: none;
    background:
        radial-gradient(
            140px 9px at var(--category-scroll-progress) 50%,
            rgba(236, 131, 109, 0.95) 0%,
            rgba(217, 97, 76, 0.7) 45%,
            rgba(217, 97, 76, 0.06) 100%
        );
    opacity: var(--category-scroll-active-opacity);
    transition: opacity 0.2s ease;
}

.our-menu-sticky-section.is-scrolling::after {
    opacity: 1;
}

#dishes-section {
    margin-top: 0.75rem;
}

/* Categories Styling */
.category-scroll-container {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-left: 0.35rem;
    padding-bottom: 0;
    margin-bottom: 0;
    scrollbar-width: none;
    position: relative;
    border-bottom: 0;
}
.category-scroll-container::-webkit-scrollbar {
    height: 0;
}
.category-scroll-container::-webkit-scrollbar-thumb {
    background: transparent;
}
.category-scroll-container::-webkit-scrollbar-thumb:hover {
    filter: none;
}
.category-scroll-container .d-flex {
    display: inline-flex;
    gap: 1.5rem;
    padding-bottom: 3px;
}

@media (min-width: 992px) {
    .our-menu-sticky-section {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .category-scroll-container {
        width: fit-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.scroll-to-top-btn {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    box-shadow: 0 12px 24px rgba(217, 97, 76, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1100;
}

.scroll-to-top-btn:hover {
    color: #fff;
    transform: translateY(0);
    box-shadow: 0 14px 28px rgba(217, 97, 76, 0.4);
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .our-menu-sticky-section {
        top: 66px;
    }
}
.category-item {
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
    min-width: 80px; /* Минимальная ширина категории */
    max-width: 80px; /* Максимальная ширина категории */
}
.category-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #F0F0F0; /* Default icon background */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0; /* Предотвращает сжатие иконки */
}
.category-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-name {
    font-size: 10px;
    font-weight: 500;
    line-height: 14px;
    color: #666;
    white-space: normal; /* Позволяет перенос текста */
    word-wrap: break-word; /* Перенос длинных слов */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничиваем до 2 строк */
    -webkit-box-orient: vertical;
    text-align: center;
}
.category-item.active {
    border-bottom-color: #D9614C; /* Active underline color */
}
.category-item.active .category-name {
    color: #D9614C; /* Active text color */
    font-weight: 600;
}


/* Product Card Styling */
.product-card {
    background-color: #FFFFFF;
    border: 1px solid #F0F0F0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.product-image-wrapper {
    position: relative;
    height: 140px;
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popular-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #D9614C;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
}
.product-content {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-title {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: #333;
    margin-bottom: 0.25rem;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    width: auto;
    max-width: 200px;
}
.product-description {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto; /* Push to bottom */
}
.product-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}
.product-weight {
    font-size: 0.7rem;
    font-weight: 500;
    color: #888;
    line-height: 1.15;
    margin-bottom: 0.15rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-price {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5rem;
}
.add-to-cart-btn-text {
    display: inline-block;
}

/* Кнопки «В заказ» / «Добавить» — общий CTA */
.emenu-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: #fff !important;
    background: linear-gradient(145deg, #e87762 0%, #d9614c 50%, #c14a38 100%);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 6px 16px rgba(217, 97, 76, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
}

.emenu-cta-btn:hover {
    filter: brightness(1.05);
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.07),
        0 8px 22px rgba(217, 97, 76, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.26);
    transform: translateY(-1px);
}

.emenu-cta-btn:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.emenu-cta-btn:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 0.2rem rgba(217, 97, 76, 0.28),
        0 6px 16px rgba(217, 97, 76, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.emenu-cta-btn__icon {
    font-size: 0.92em;
    opacity: 0.95;
}

.emenu-cta-btn--xs {
    border-radius: 0.55rem;
    padding: 0.34rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.emenu-cta-btn--sm {
    border-radius: 999px;
    padding: 0.4rem 0.78rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.emenu-cta-btn--lg {
    border-radius: 0.85rem;
    padding: 0.82rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.emenu-cta-btn--block {
    border-radius: 0.85rem;
    padding: 0.72rem 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.emenu-cta-btn__block-start {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.emenu-cta-btn__total {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    opacity: 0.96;
}

.add-item-weight {
    font-size: 0.78rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
}

/* Стили для авторизации и корзины */
#user-info {
    display: flex;
    align-items: center;
}

#cart-section {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.plus-btn {
    display: inline-block;
    font-family: "Lab" !important;
    font-weight: 400;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 1.75rem;
}

@media (max-width: 768px) {
    #content-area {
        --bs-gutter-x: 0.65rem;
    }
    .product-card {
        flex-direction: row;
        align-items: stretch;
        min-height: 122px;
    }
    .product-image-wrapper {
        width: 118px;
        min-width: 118px;
        height: auto;
    }
    .product-image {
        height: 100%;
    }
    .popular-tag {
        top: 0.45rem;
        left: 0.45rem;
        font-size: 0.62rem;
        padding: 0.15rem 0.45rem;
    }
    .product-content {
        padding: 0.6rem 0.65rem;
    }
    .product-title {
        font-size: 0.9rem;
        line-height: 1.18rem;
        margin-bottom: 0.2rem;
        max-width: none;
        white-space: normal;
    }
    .product-description {
        font-size: 0.72rem;
        line-height: 1.05rem;
        margin-bottom: 0.32rem;
        -webkit-line-clamp: 2;
    }
    .product-weight {
        font-size: 0.66rem;
        margin-bottom: 0.05rem;
    }
    .product-footer {
        margin-top: 0.12rem;
        align-items: center;
    }
    .add-to-cart-btn.emenu-cta-btn--sm {
        min-height: 1.9rem;
        padding: 0.32rem 0.62rem;
        font-size: 0.72rem;
        font-weight: 700;
    }
    .product-price {
        font-family: 'Montserrat', 'Inter', sans-serif;
        font-weight: 800;
        font-size: 0.95rem;
        color: #8b3f30;
    }
}

.add-to-cart-from-modal-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.cart-item {
    border-bottom: 1px solid #dee2e6;
    padding: 10px 0;
}

#header-cart-count {
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%) !important;
    color: #fff !important;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(217, 97, 76, 0.35);
    font-weight: 700;
}

#cart-items-container .decrease-btn,
#cart-items-container .increase-btn {
    border-color: #d9614c;
    color: #d9614c;
    border-radius: 0.6rem;
}

#cart-items-container .btn-group.btn-group-sm {
    display: inline-flex;
    gap: 0.45rem;
}

#cart-items-container .btn-group.btn-group-sm > .btn {
    border-radius: 0.6rem;
}

#cart-items-container .decrease-btn:hover,
#cart-items-container .increase-btn:hover {
    background-color: #fff2ed;
    border-color: #c8513d;
    color: #c8513d;
}

.cart-item-row {
    gap: 0.75rem;
}

.cart-item-image-wrap {
    width: 88px;
    min-width: 88px;
    align-self: stretch;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f3f4f6;
}

.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Стили для dropdown меню пользователя */
.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 1.5rem;
    text-align: center;
}

#user-info .dropdown-menu {
    border-radius: 0.9rem;
    border: 0;
    border-top: 3px solid #d9614c;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    padding: 0.4rem;
    min-width: 220px;
}

#user-info .dropdown-item {
    border-radius: 0.65rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

#user-info .dropdown-item i {
    color: #d9614c;
}

#user-info .dropdown-item:hover,
#user-info .dropdown-item:focus {
    background: linear-gradient(180deg, #fff5f2 0%, #fff 100%);
    color: #d9614c;
}

#user-info .dropdown-divider {
    margin: 0.35rem 0;
    border-color: #edf1f7;
}

.user-avatar {
    cursor: pointer;
}
.user-avatar:hover {
    opacity: 0.8;
}

/* Улучшенный стиль строки поиска */
.search-container {
    position: relative;
    padding: 0 0.5rem;
}

#search-input {
    border-radius: 1.5rem; /* Более округлые края */
    background-color: #FFFFFF;
    border: 1px solid #e9ecef;
    padding: 0.4rem 1.25rem 0.4rem 3rem;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: auto;
}

#search-input:focus {
    box-shadow: 0 4px 15px rgba(217, 97, 76, 0.2);
    border-color: #D9614C;
    outline: none;
}

#search-input::placeholder {
    color: #adb5bd;
    font-size: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1rem;
    z-index: 10;
}

#clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

#clear-search:hover {
    color: #fff;
    background-color: #D9614C;
}

/* Стили для результатов поиска */
#search-results-container {
    position: absolute;
    top: 100%;
    left: 0.5rem;
    right: 0.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 70vh;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #fff9f8;
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 0.75rem;
    object-fit: cover;
    margin-right: 1rem;
    border: 1px solid #f0f0f0;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-result-description {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-price {
    font-size: 0.9rem;
    color: #D9614C;
    font-weight: 700;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.no-results i {
    font-size: 3rem;
    color: #e9ecef;
    margin-bottom: 1rem;
}


/* Стили для модального окна добавления товара в корзину */
#addItemModal .modal-content {
    border-radius: 1.5rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#addItemModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

#addItemModal .modal-title {
    font-weight: 700;
    color: #333;
}

#addItemModal .modal-body {
    padding: 1.5rem;
}

#addItemModal #addItemImage {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

#addItemModal #addItemName {
    font-weight: 700;
    color: #333;
    font-size: 0.875rem;
}

#addItemModal #addItemDescription {
    font-size: 0.75rem;
    line-height: 1rem;
}

#addItemModal #addItemPrice {
    color: #D9614C;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: right;
}

#addItemModal .form-label {
    font-weight: 700;
    color: #333;
    font-size: 0.875rem;
}

#addItemModal .input-group button:active {
    background-color: #D9614C;
    border-color: #D9614C;
    color: white;
}

#addItemModal #itemComment {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    resize: vertical;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    display: inline-flex;
    height: 3rem;
    font-size: smaller;
}

/* Стили для круглых кнопок изменения количества — как на первой картинке */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: 1rem 0;
}

.quantity-block {
    align-items: baseline;
    gap: 8px;
    margin-right: 0.75rem;
}

.btn-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #666;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-circle:hover {
    background-color: #e9ecef;
    border-color: #D9614C;
    color: #D9614C;
}

.btn-circle:active {
    background-color: #D9614C;
    border-color: #D9614C;
    color: white;
}

.quantity-value {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

#addItemModal #itemComment:focus {
    border-color: #D9614C;
    box-shadow: 0 0 0 0.2rem rgba(217, 97, 76, 0.25);
}

#addItemModal #itemComment::placeholder {
    color: #adb5bd;
}

#addItemModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

#addItemModal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

#addItemModal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

#addItemModal #addItemToCartBtn {
    margin-top: 0.15rem;
}

#cart-modal .modal-content {
    border-radius: 1.2rem !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18) !important;
    border: 0 !important;
    border-top: 4px solid #d9614c !important;
}

#cart-modal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 1rem 1.25rem 0.85rem;
}

#cart-modal .modal-title {
    font-weight: 700;
    color: #1f2937;
}

#cart-modal .modal-body {
    padding: 1rem 1.25rem;
}

#cart-modal .modal-footer {
    border-top: 1px solid #eef2f7;
    padding: 0.9rem 1.25rem 1.15rem;
}

#cart-modal #checkout-btn {
    border: none;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    box-shadow: 0 8px 18px rgba(217, 97, 76, 0.25);
}

#cart-modal #checkout-btn:hover {
    filter: brightness(1.03);
}

#cart-modal #guest-checkout-message {
    border-radius: 0.75rem;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1e3a8a;
    flex-shrink: 0;
}

#profile-modal .modal-content,
#orders-history-modal .modal-content {
    border-radius: 1.2rem !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18) !important;
    border: 0 !important;
    border-top: 4px solid #d9614c !important;
}

#profile-modal .profile-modal-content {
    background: linear-gradient(180deg, #fff8f4 0%, #ffffff 48%, #fffdfb 100%);
}

#profile-modal .profile-modal-header {
    border-bottom: 1px solid rgba(217, 97, 76, 0.18);
}

#profile-modal .profile-modal-body {
    background: radial-gradient(circle at top right, rgba(217, 97, 76, 0.08) 0%, rgba(255, 255, 255, 0) 45%);
}

#profile-modal .profile-avatar-card {
    background: #fff;
    border: 1px solid #f1e6de;
    border-radius: 1rem;
    padding: 1rem 0.85rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

#profile-modal .profile-avatar-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid rgba(217, 97, 76, 0.2);
    box-shadow: 0 8px 18px rgba(217, 97, 76, 0.16);
}

#profile-modal .profile-avatar-change-btn,
#profile-modal .profile-close-btn {
    border-color: #d7c8bd;
    color: #6b4d3e;
}

#profile-modal .profile-save-btn {
    border: none;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    box-shadow: 0 8px 18px rgba(217, 97, 76, 0.25);
}

#profile-modal .profile-save-btn:hover {
    filter: brightness(1.03);
}

#profile-modal .profile-modal-footer {
    border-top: 1px solid rgba(217, 97, 76, 0.14);
}

#profile-modal .modal-header,
#orders-history-modal .modal-header {
    border-bottom: 1px solid #eef2f7;
    padding: 1rem 1.25rem 0.85rem;
}

#profile-modal .modal-title,
#orders-history-modal .modal-title {
    font-weight: 700;
    color: #1f2937;
}

#profile-modal .modal-body,
#orders-history-modal .modal-body {
    padding: 1rem 1.25rem;
}

#profile-modal .modal-footer,
#orders-history-modal .modal-footer {
    border-top: 1px solid #eef2f7;
    padding: 0.9rem 1.25rem 1.15rem;
}

#profile-modal .bg-light {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e7edf5;
}

#profile-modal .profile-meta-card {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#profile-modal .profile-tabs .nav-link {
    border-radius: 999px;
    font-weight: 600;
    color: #64748b;
}

#profile-modal .profile-tabs .nav-link.active {
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    color: #fff;
}

#profile-modal .admin-section-card {
    border: 1px solid #e7edf5;
    border-radius: 0.9rem;
    padding: 0.9rem;
    background: #fff;
}

#profile-modal .admin-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

#profile-modal .admin-list-item {
    border: 1px solid #edf2f7;
    border-radius: 0.75rem;
    padding: 0.55rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
}

#profile-modal .admin-banner-preview {
    width: 56px;
    height: 40px;
    border-radius: 0.45rem;
    object-fit: cover;
}

.admin-page .admin-section-card {
    border: 1px solid #e7edf5;
    border-radius: 0.9rem;
    padding: 0.9rem;
    background: #fff;
}

.admin-page .admin-side-menu {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e7edf5;
    border-radius: 0.95rem;
    padding: 0.35rem;
    gap: 0.35rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1rem;
}

.admin-page .admin-side-link {
    border-radius: 0.75rem;
    border: 0;
    text-align: left;
    color: #64748b;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    transition: all 0.2s ease;
    background: transparent;
}

.admin-page .admin-side-link:hover {
    color: #d9614c;
    background: #fff5f2;
}

.admin-page .admin-side-link.active {
    color: #fff;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    box-shadow: 0 6px 14px rgba(217, 97, 76, 0.24);
}

.admin-page .admin-pane {
    display: none;
}

.admin-page .admin-pane.active {
    display: block;
}

.admin-page .admin-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 420px;
    overflow-y: auto;
}

.admin-page .admin-orders-card {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

.admin-page .admin-orders-list-wrap {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.admin-page .admin-order-item {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.admin-page .admin-order-amount {
    color: #8b3f30;
    font-size: 0.98rem;
}

.admin-page .admin-order-meta {
    color: #475569;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.admin-page .admin-order-status-toggle {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.admin-page .admin-order-status-btn {
    border-radius: 999px;
    border: 1px solid #d6dce6;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 0.24rem 0.62rem;
}

.admin-page .admin-order-status-btn:hover {
    border-color: #d9614c;
    color: #d9614c;
    background: #fff5f2;
}

.admin-page .admin-order-status-btn.active {
    border-color: #d9614c;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(217, 97, 76, 0.25);
}

.admin-page .admin-order-items-wrap {
    width: 100%;
}

.admin-page .admin-order-items {
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e8edf3;
    border-radius: 0.55rem;
}

.admin-page .admin-order-item-row {
    font-size: 0.8rem;
    line-height: 1.35;
    padding: 0.32rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 0.5rem !important;
}

.admin-page .admin-order-item-row:last-child {
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

.admin-page .admin-order-item-name {
    min-width: 0;
    color: #334155;
    word-break: break-word;
}

.admin-page .admin-order-item-qty-prefix {
    color: #64748b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-right: 0.2rem;
}

.admin-page .admin-order-item-sum {
    flex-shrink: 0;
    color: #8b3f30;
    font-variant-numeric: tabular-nums;
}

.admin-page .admin-list-item {
    border: 1px solid #edf2f7;
    border-radius: 0.75rem;
    padding: 0.55rem 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
}

.admin-page .admin-user-item {
    align-items: flex-start;
}

.admin-page .admin-user-main {
    min-width: 190px;
}

.admin-page .admin-user-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.admin-page .admin-user-role-group {
    display: inline-flex;
    background: #eef3f9;
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    padding: 0.2rem;
    gap: 0.2rem;
}

.admin-page .admin-role-pill {
    margin: 0;
    cursor: pointer;
}

.admin-page .admin-role-pill input {
    display: none;
}

.admin-page .admin-role-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 0.26rem 0.62rem;
    border-radius: 999px;
    color: #64748b;
    font-size: 0.79rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.16s ease;
}

.admin-page .admin-role-pill input:checked + span {
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(217, 97, 76, 0.28);
}

.admin-page .admin-block-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
    margin: 0;
}

.admin-page .admin-block-toggle input {
    accent-color: #d9614c;
}

.admin-page .admin-banner-preview {
    width: 56px;
    height: 40px;
    border-radius: 0.45rem;
    object-fit: cover;
}

#admin-stats-chart {
    min-height: 240px;
}

#orders-history-modal .order-card {
    border: 1px solid #e7edf5;
    border-radius: 0.85rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

#orders-history-modal .order-card:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#orders-history-modal .order-toggle-items-btn,
#orders-history-modal .order-repeat-btn {
    border-radius: 0.7rem;
}

#orders-history-modal .order-repeat-btn {
    border-color: #d9614c;
    color: #d9614c;
}

#orders-history-modal .order-repeat-btn:hover {
    background: #d9614c;
    color: #fff;
}

#contacts-modal .modal-content {
    border-radius: 1.2rem !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18) !important;
    border: 0 !important;
    border-top: 4px solid #d9614c !important;
}

#contacts-modal .modal-header {
    border-bottom: 1px solid #eef2f7;
}

#contacts-modal .modal-footer {
    border-top: 1px solid #eef2f7;
}

#contacts-modal .form-control[readonly] {
    background: #f8fafc;
    color: #475569;
}

.checkout-confirm-dialog {
    max-width: min(400px, calc(100vw - 1.75rem));
}

.checkout-confirm-content {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem !important;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 22px 48px rgba(15, 23, 42, 0.16) !important;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fffefb 0%, #fff 38%, #fbf7f4 100%);
}

.checkout-confirm-accent {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, #e87762 0%, #d9614c 45%, #c14a38 100%);
    pointer-events: none;
    z-index: 2;
}

.checkout-confirm-body {
    position: relative;
    text-align: center;
    padding: 2rem 1.35rem 1.25rem;
}

.checkout-confirm-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    opacity: 0.55;
    padding: 0.5rem;
}

.checkout-confirm-close:hover {
    opacity: 0.9;
}

.checkout-confirm-hero {
    max-width: 19rem;
    margin: 0 auto;
    padding-top: 0.35rem;
}

.checkout-confirm-icon-ring {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(145deg, rgba(232, 119, 98, 0.55), rgba(217, 97, 76, 0.2));
    box-shadow: 0 8px 22px rgba(217, 97, 76, 0.18);
}

.checkout-confirm-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fff 0%, #fff5f2 100%);
    color: #d9614c;
    font-size: 1.45rem;
}

.checkout-confirm-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1e293b;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.checkout-confirm-lead {
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    margin: 0 0 0.45rem;
    line-height: 1.45;
}

.checkout-confirm-hint {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
    margin: 0;
}

.checkout-confirm-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: stretch;
    padding: 0.85rem 1.1rem 1.15rem !important;
    margin: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(6px);
}

.checkout-confirm-btn-cancel {
    flex: 1 1 calc(50% - 0.33rem);
    min-height: 2.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #475569 !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.checkout-confirm-btn-cancel:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.16);
    color: #334155 !important;
}

.checkout-confirm-btn-cancel:active {
    transform: scale(0.99);
}

.checkout-confirm-btn-cancel:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(100, 116, 139, 0.25);
    border-color: rgba(100, 116, 139, 0.35);
}

.checkout-confirm-btn-submit {
    flex: 1 1 calc(50% - 0.33rem);
    min-height: 2.65rem;
    border-radius: 0.75rem !important;
    padding: 0.55rem 0.85rem !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 6px 16px rgba(217, 97, 76, 0.28) !important;
}

.checkout-confirm-btn-submit:hover {
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.07),
        0 8px 22px rgba(217, 97, 76, 0.36) !important;
}

@media (max-width: 380px) {
    .checkout-confirm-footer {
        flex-direction: column;
    }

    .checkout-confirm-btn-cancel,
    .checkout-confirm-btn-submit {
        flex: 1 1 auto;
        width: 100%;
    }
}

.cart-fullscreen-modal {
    border: 0;
    border-radius: 0;
}

/* Корзина: на md+ компактное окно, на мобильных — на весь экран (modal-fullscreen-md-down) */
@media (min-width: 768px) {
    #cart-modal .cart-modal-dialog {
        max-width: min(580px, calc(100vw - 2rem));
        width: 100%;
    }

    #cart-modal .cart-fullscreen-modal {
        border-radius: 1.2rem !important;
        max-height: min(92vh, 900px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #cart-modal .cart-fullscreen-body {
        padding-bottom: 0.75rem;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #cart-modal .cart-fullscreen-footer {
        position: static;
        flex-shrink: 0;
    }

    .cart-addon-card {
        width: 122px;
        min-width: 122px;
        max-width: 122px;
    }
}

@media (max-width: 767.98px) {
    #cart-modal .cart-fullscreen-modal {
        border-radius: 0 !important;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #cart-modal .cart-fullscreen-body {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
}

.cart-modal-header {
    position: relative;
}
.cart-modal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}
.cart-back-header-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #6c757d;
    border-radius: 50%;
    margin-right: 0.25rem;
}
.cart-back-header-btn:hover {
    background: rgba(108, 117, 125, 0.12);
    color: #495057;
}
.cart-icon-action {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #6c757d;
    border-radius: 50%;
}
.cart-icon-action:hover {
    background: rgba(108, 117, 125, 0.12);
    color: #495057;
}
.cart-fullscreen-body {
    padding-bottom: 150px;
    background: #f9f5f2;
}

/* Корзина: скролл товаров+допов; итоги всегда под шагом, над кнопкой (вне скролла) */
#cart-modal .cart-fullscreen-body {
    padding-bottom: 0;
    min-height: 0;
}

#cart-modal .modal-dialog-scrollable .cart-fullscreen-body {
    overflow: hidden !important;
}

#cart-modal .cart-step-pane--items {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cart-modal .cart-items-scroll-wrap {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-right: max(1.1rem, 18px);
    margin-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 97, 76, 0.42) rgba(15, 23, 42, 0.06);
}

#cart-modal .cart-items-scroll-wrap::-webkit-scrollbar {
    width: 9px;
}

#cart-modal .cart-items-scroll-wrap::-webkit-scrollbar-track {
    margin: 0.35rem 0;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
}

#cart-modal .cart-items-scroll-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(217, 97, 76, 0.55) 0%, rgba(200, 81, 61, 0.5) 100%);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#cart-modal .cart-items-scroll-wrap::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(217, 97, 76, 0.72) 0%, rgba(200, 81, 61, 0.65) 100%);
    background-clip: padding-box;
}

#cart-modal .cart-step-pane--checkout {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    /* Запас под вертикальный скроллбар (как у списка товаров), чтобы не наезжал на текст */
    padding-right: max(1.1rem, 18px);
    margin-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 97, 76, 0.42) rgba(15, 23, 42, 0.06);
}

#cart-modal .cart-step-pane--checkout::-webkit-scrollbar {
    width: 9px;
}

#cart-modal .cart-step-pane--checkout::-webkit-scrollbar-track {
    margin: 0.35rem 0;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 999px;
}

#cart-modal .cart-step-pane--checkout::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(217, 97, 76, 0.55) 0%, rgba(200, 81, 61, 0.5) 100%);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

#cart-modal .cart-step-pane--checkout::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(217, 97, 76, 0.72) 0%, rgba(200, 81, 61, 0.65) 100%);
    background-clip: padding-box;
}

@media (max-width: 767.98px) {
    /* Компактный зазор: итоги над фиксированной кнопкой «Продолжить» */
    #cart-modal .cart-fullscreen-body {
        padding-bottom: calc(3.15rem + env(safe-area-inset-bottom, 0px));
    }

    #cart-modal .cart-items-scroll-wrap {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    #cart-modal .cart-step-pane--checkout {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    #cart-modal .cart-order-summary {
        margin-top: 0.4rem;
        margin-bottom: 0.1rem;
        padding: 0.5rem max(0.75rem, 14px) 0.35rem;
        font-size: 0.8125rem;
        -webkit-text-size-adjust: 100%;
        color: #1f2937;
    }

    #cart-modal .cart-order-summary strong {
        font-size: 0.8125rem;
        font-weight: 600;
        color: #111827;
    }

    #cart-modal .cart-order-summary #modal-cart-subtotal-row .text-muted,
    #cart-modal .cart-order-summary #modal-cart-discount-row span:first-child,
    #cart-modal .cart-order-summary #modal-cart-delivery-row span:first-child {
        font-size: 0.78rem;
        color: #374151 !important;
    }

    #cart-modal .cart-order-summary #modal-cart-discount-row span:last-child,
    #cart-modal .cart-order-summary #modal-cart-subtotal-row span:last-child,
    #cart-modal .cart-order-summary #modal-cart-delivery-row span:last-child {
        color: #111827 !important;
        font-weight: 500;
    }
}

#cart-modal .cart-items-scroll-wrap #cart-addons-section {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0.65rem;
}

#cart-modal .cart-order-summary {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    padding: 0.5rem max(0.75rem, 14px) 0.38rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    border-radius: 0.75rem 0.75rem 0 0;
    line-height: 1.4;
}

#cart-modal .cart-order-summary .cart-order-summary-row {
    margin-bottom: 0.26rem;
    min-height: 1.2em;
}

#cart-modal .cart-order-summary .cart-order-summary-row:last-child {
    margin-bottom: 0;
}

#cart-modal .cart-order-summary .cart-order-summary-row--total {
    margin-top: 0.22rem;
    padding-top: 0.32rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

#cart-modal .cart-delivery-fields .cart-address-card {
    background: linear-gradient(180deg, #fff 0%, #fbf7f4 100%);
    border: 1px solid rgba(217, 97, 76, 0.2);
    border-radius: 0.85rem;
    padding: 0.6rem 0.7rem 0.65rem;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

#cart-modal .cart-address-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #c4513d;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

#cart-modal .cart-address-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    color: #6b7280;
    margin-bottom: 0.18rem;
}

#cart-modal .cart-address-input {
    border-radius: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.84rem;
    padding: 0.36rem 0.52rem;
    background: #fff;
}

#cart-modal .cart-address-input:focus {
    border-color: rgba(217, 97, 76, 0.55);
    box-shadow: 0 0 0 0.12rem rgba(217, 97, 76, 0.18);
}

#cart-modal textarea.cart-address-input {
    min-height: 4.25rem;
    resize: vertical;
    line-height: 1.45;
}

/* Тип оплаты: ширина по содержимому, скользящая подсветка */
#payment-type-switcher.cart-order-type-toggle {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    padding: 3px;
    width: fit-content;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#payment-type-switcher .cart-payment-type-slider {
    position: absolute;
    left: 0;
    top: 3px;
    height: calc(100% - 6px);
    border-radius: 999px;
    z-index: 0;
    background: linear-gradient(180deg, #e57a68 0%, #d9614c 42%, #c4513d 100%);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translate3d(0, 0, 0);
    width: 0;
    /* Ширину меняем мгновенно; анимируем только сдвиг — иначе правый край «выпрыгивает» */
    transition: transform 0.32s cubic-bezier(0.33, 1, 0.68, 1);
    transition-property: transform;
    pointer-events: none;
    will-change: transform;
    backface-visibility: hidden;
}

#payment-type-switcher .cart-payment-type-btn {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    border: 0;
    padding: 0.4rem 0.92rem;
    border-radius: 999px;
    background: transparent !important;
    color: #5b616a;
    font-weight: 500;
    font-size: 0.84rem;
    line-height: 1.25;
    box-shadow: none !important;
    transition: color 0.22s ease;
    white-space: nowrap;
}

#payment-type-switcher .cart-payment-type-btn:hover:not(.active) {
    color: #2d3340;
}

#payment-type-switcher .cart-payment-type-btn.active {
    background: transparent !important;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    #payment-type-switcher .cart-payment-type-slider {
        transition-duration: 0.01ms;
    }

    #payment-type-switcher .cart-payment-type-btn {
        transition: none;
    }
}

@media (min-width: 768px) {
    #cart-modal .cart-order-summary {
        font-size: 0.76rem;
        color: #4b5563;
    }

    #cart-modal .cart-order-summary strong {
        font-size: 0.76rem;
        font-weight: 600;
        color: #1f2937;
    }

    #cart-modal .cart-order-summary #modal-cart-subtotal-row .text-muted,
    #cart-modal .cart-order-summary #modal-cart-discount-row span:first-child,
    #cart-modal .cart-order-summary #modal-cart-delivery-row span:first-child {
        font-size: 0.72rem;
    }
}

#cart-modal .cart-fullscreen-footer {
    background: transparent;
    border-top: none;
    box-shadow: none;
}

.cart-order-type-toggle-wrap {
    display: flex;
    justify-content: center;
}
.cart-fullscreen-footer {
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 767.98px) {
    .cart-fullscreen-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 3;
    }

    #cart-modal .cart-fullscreen-footer {
        padding-top: 0.15rem;
        padding-bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
    }
}
.cart-order-type-toggle {
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.2rem;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.07);
}
.cart-order-type-btn {
    border-radius: 999px;
    border: 0;
    padding: 0.38rem 1rem;
}
.cart-order-type-btn.active {
    background: #d9614c;
    color: #fff;
}
.cart-item-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.cart-item-main {
    flex: 1;
    min-width: 0;
    font-size: 0.84rem;
}
.cart-item-main h6 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.42rem !important;
}
.cart-item-main strong {
    font-size: 0.82rem;
}
.cart-item-image-wrap {
    width: 72px;
    min-width: 72px;
    align-self: flex-start;
}
.cart-item-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 0.75rem;
}
.cart-qty-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-qty-box .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
}
.cart-item-qty {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}
.cart-item-weight {
    font-size: 0.72rem;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}
/* Блок «Дополнить заказ» в корзине */
#cart-addons-section {
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(217, 97, 76, 0.2);
}

#cart-addons-section .cart-addons-heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

#cart-addons-section .cart-addons-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, rgba(217, 97, 76, 0.14) 0%, rgba(217, 97, 76, 0.06) 100%);
    color: #d9614c;
    font-size: 0.78rem;
}

#cart-addons-section .cart-addons-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.01em;
}

/* Горизонтальный скролл карточек допов */
.cart-addons-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0.35rem 0.4rem;
    margin: 0 -0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 97, 76, 0.45) transparent;
}

.cart-addons-scroll::-webkit-scrollbar {
    height: 6px;
}

.cart-addons-scroll::-webkit-scrollbar-thumb {
    background: rgba(217, 97, 76, 0.4);
    border-radius: 999px;
}

.cart-addons-scroll::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 999px;
}

.cart-addons-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: max-content;
}

.cart-addon-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    min-height: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fcfaf8 100%);
    border: 1px solid #ebe6e1;
    border-radius: 0.85rem;
    padding: 0.4rem 0.45rem 0.45rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cart-addon-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d9614c 0%, #e88874 100%);
    border-radius: 0.85rem 0.85rem 0 0;
    opacity: 0.95;
}

.cart-addon-card:hover {
    border-color: rgba(217, 97, 76, 0.35);
    box-shadow: 0 6px 16px rgba(217, 97, 76, 0.12);
    transform: translateY(-1px);
}

.cart-addon-thumb-wrap {
    border-radius: 0.55rem;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f4f0ec;
    margin-bottom: 0.35rem;
}

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

.cart-addon-thumb--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9bfb7;
    font-size: 1.05rem;
}

.cart-addon-meta {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 0.05rem;
    margin-bottom: 0.35rem;
}

.cart-addon-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.28;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.56em;
    letter-spacing: 0.01em;
}

.cart-addon-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-top: 0.2rem;
}

.cart-addon-price {
    font-size: 0.74rem;
    font-weight: 800;
    font-family: "Montserrat", "Inter", system-ui, sans-serif;
    color: #d9614c;
    letter-spacing: 0.02em;
}

.cart-addon-currency {
    font-size: 0.62rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-addon-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    width: 100%;
    margin-top: auto;
    line-height: 1.2;
}

.cart-addon-add-btn:hover {
    color: #fff !important;
}

.cart-addon-add-btn:active {
    transform: scale(0.985);
}

.cart-addon-add-btn .emenu-cta-btn__icon {
    font-size: 0.58rem;
}

.cart-addon-add-label {
    letter-spacing: 0.02em;
}
#cart-continue-btn {
    border: none;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #d9614c 0%, #c8513d 100%);
    box-shadow: 0 8px 18px rgba(217, 97, 76, 0.25);
}
#cart-continue-btn:hover {
    color: #fff;
    filter: brightness(0.97);
}

@media (max-width: 767.98px) {
    .admin-page .admin-side-menu {
        position: static;
        flex-direction: row;
        overflow-x: auto;
    }

    .admin-page .admin-side-link {
        flex: 0 0 auto;
        font-size: 0.9rem;
        padding: 0.45rem 0.72rem;
    }

    .header-top .logo {
        font-size: 1.2rem !important;
        letter-spacing: 0.3px;
    }

    .header-top .container-fluid {
        gap: 0.25rem;
    }
}

@media (max-width: 991.98px) {
    #open-contacts-btn,
    #venue-phone-link {
        display: none !important;
    }
}

/* Theme overrides must be last to beat legacy hardcoded colors */
body {
    background-color: var(--emenu-ui-bg) !important;
    color: var(--emenu-ui-text);
}

.header-top,
.mobile-header-menu,
.admin-page .admin-section-card,
.product-card,
.promo-strip .promo-card,
.profile-order-item,
.dropdown-menu,
#cart-modal .modal-content,
#profile-modal .modal-content,
#orders-history-modal .modal-content,
#contacts-modal .modal-content {
    background: var(--emenu-ui-surface) !important;
}

.text-muted,
.small.text-muted,
.promo-text,
.category-name,
.product-description,
.search-icon,
#header-cart-total,
#telegram-auth-container .auth-entry-label {
    color: var(--emenu-ui-muted) !important;
}

.logo,
.emenu-footer-link,
.promo-badge,
.promo-icon,
.category-item.active .category-name,
#user-info .dropdown-item i,
.search-result-price,
#addItemModal #addItemPrice,
.cart-addon-price,
.admin-page .admin-order-amount,
.product-price {
    color: var(--emenu-primary) !important;
}

.logo {
    background: linear-gradient(to right, var(--emenu-primary), var(--emenu-primary-darker)) !important;
}

.emenu-cta-btn,
#cart-modal #checkout-btn,
#cart-continue-btn,
#header-cart-count,
.scroll-to-top-btn,
.popular-tag,
.admin-page .admin-order-status-btn.active,
.admin-page .admin-side-link.active,
.btn-primary {
    background: var(--emenu-primary-gradient) !important;
    border-color: var(--emenu-primary) !important;
}

#search-input:focus,
.comment-textarea:focus,
.cart-order-fields .form-control:focus,
#addItemModal #itemComment:focus,
.admin-page .admin-order-status-btn:hover,
.admin-page .admin-side-link:hover {
    border-color: var(--emenu-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--emenu-primary-rgb), 0.2) !important;
}

/* Cart switchers: order type + payment type */
#order-type-switcher.cart-order-type-toggle {
    border-color: rgba(var(--emenu-primary-rgb), 0.22) !important;
    background: var(--emenu-ui-surface) !important;
}

#order-type-switcher .cart-order-type-btn {
    color: var(--emenu-ui-muted) !important;
}

#order-type-switcher .cart-order-type-btn.active {
    background: var(--emenu-primary-gradient) !important;
    color: #fff !important;
    border-color: var(--emenu-primary) !important;
}

#payment-type-switcher.cart-order-type-toggle {
    border-color: rgba(var(--emenu-primary-rgb), 0.22) !important;
    background: var(--emenu-ui-surface) !important;
}

#payment-type-switcher .cart-payment-type-btn {
    color: var(--emenu-ui-muted) !important;
}

#payment-type-switcher .cart-payment-type-slider {
    background: var(--emenu-primary-gradient) !important;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 6px 14px rgba(var(--emenu-primary-rgb), 0.24) !important;
}

#payment-type-switcher .cart-payment-type-btn.active {
    color: #fff !important;
}

/* Fixes requested after theme rollout */
#cart-modal .modal-content,
#profile-modal .modal-content,
#orders-history-modal .modal-content,
#contacts-modal .modal-content {
    border-top-color: var(--emenu-primary) !important;
}

#cart-modal .cart-address-card-title {
    color: var(--emenu-primary) !important;
}

.btn-circle:hover {
    border-color: var(--emenu-primary) !important;
    color: var(--emenu-primary) !important;
    background-color: var(--emenu-primary-lighter) !important;
}

.btn-circle:active {
    background-color: var(--emenu-primary) !important;
    border-color: var(--emenu-primary) !important;
    color: #fff !important;
}

.admin-page .admin-side-link.active:hover,
.admin-page .admin-side-link.active:focus {
    color: #fff !important;
    background: var(--emenu-primary-gradient) !important;
}

.logo {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: var(--emenu-primary) !important;
}

/* Admin users: role switcher in themed style */
.admin-page .admin-user-role-group {
    background: var(--emenu-primary-lighter) !important;
    border-color: rgba(var(--emenu-primary-rgb), 0.28) !important;
}

.admin-page .admin-role-pill span {
    color: var(--emenu-ui-muted) !important;
    font-weight: 700;
}

.admin-page .admin-role-pill input:checked + span {
    background: var(--emenu-primary-gradient) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(var(--emenu-primary-rgb), 0.3) !important;
}
