* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #DC143C;
    --primary-dark: #B01030;
    --secondary-color: #FF6B6B;
    --dark-color: #1A1A1A;
    --text-color: #333;
    --text-light: #666;
    --border-color: #E0E0E0;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --success-color: #10B981;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow: var(--shadow-md);
    --sidebar-width: 560px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container-fluid {
    max-width: 100%;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    margin-right: 12px;
}

.header-search {
    flex: 1;
    max-width: 820px;
    position: relative;
}

.search-input {
    width: 100%;
    min-height: 68px;
    padding: 16px 24px;
    font-size: 28px;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-light);
}

.search-keyboard {
    position: fixed;
    top: 128px;
    left: 8px;
    right: 8px;
    z-index: 900;
    width: auto;
    max-width: calc(100vw - 16px);
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}

.search-keyboard .totem-key {
    min-height: 58px;
    font-size: 24px;
}

.search-key--clear {
    background: #FEF3C7;
    border-color: #FCD34D;
    color: #92400E;
}

.search-key--ok {
    background: #DCFCE7;
    border-color: #86EFAC;
    color: #166534;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
    background: var(--white);
}

.cart-icon {
    position: relative;
    background: var(--primary-color);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    flex-shrink: 0;
}

.header .cart-icon {
    display: none;
}

.cart-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 12px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0 6px;
    border: 2px solid var(--white);
}

.floating-order-button {
    position: fixed;
    left: calc(var(--sidebar-width) + 24px);
    right: 24px;
    bottom: 18px;
    z-index: 850;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--white);
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.floating-order-count {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
}

body.cart-has-items .main-content {
    padding-bottom: 118px;
}

body.regular-product-add-active .floating-order-button,
body.pizza-inline-add-active .floating-order-button {
    bottom: 108px;
}

/* Main Layout */
.main-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #E5E7EB;
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    transition: transform 0.3s;
}

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

.sidebar-header h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-color);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

.categories-menu {
    padding: 10px;
}

.category-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.04);
    background: #F8FAFC;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    margin-bottom: 7px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.category-item:hover {
    background: var(--white);
    border-color: rgba(220, 20, 60, 0.22);
    transform: translateY(-1px);
}

.category-item.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(220, 20, 60, 0.2);
}

.category-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.category-text {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-name {
    font-size: 22px;
    font-weight: 600;
}

.category-count {
    font-size: 18px;
    font-weight: 700;
    background: var(--bg-light);
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.products-list {
    max-width: 1200px;
    margin: 0 auto;
}

.products-scroll-arrow {
    width: 100%;
    min-height: 74px;
    margin: 12px 0 128px;
    border: 2px solid rgba(220, 20, 60, 0.25);
    border-radius: 12px;
    background: #FFFFFF;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-scroll-arrow span {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Product Item - Layout Horizontal */
.product-item {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 20px;
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.product-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.regular-select-card {
    cursor: pointer;
    position: relative;
}

.regular-select-card.regular-product-selected {
    border-color: var(--primary-color);
    background: rgba(220, 20, 60, 0.05);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.16);
}

.product-image-container {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.product-category-top {
    display: inline-block;
    font-size: 11px;
    color: var(--white);
    background: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    margin-bottom: 4px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.product-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.product-category {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(220, 20, 60, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    min-width: 150px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add-product {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(220, 20, 60, 0.18);
}

.btn-add-product:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(220, 20, 60, 0.24);
}

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

.regular-product-add-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    background: var(--white);
    border-top: 2px solid var(--primary-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    z-index: 200;
}

body.regular-product-add-active .main-content {
    padding-bottom: 96px;
}

.regular-product-add-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: var(--text-color);
}

.regular-product-add-info strong {
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.regular-product-add-info span {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-add-product-bottom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(220,20,60,0.2);
}

.btn-add-product-bottom:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(220,20,60,0.26);
}

.btn-add-product-bottom:active {
    transform: scale(0.98);
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -100%;
    top: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 12px 16px;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cart-header h2 {
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.close-cart {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    position: absolute;
    right: 12px;
}

.close-cart:hover {
    background: rgba(255,255,255,0.2);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 130px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

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

.cart-item {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg-light);
    margin-bottom: 8px;
}

.cart-item-image {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--white);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    color: var(--dark-color);
    line-height: 1.3;
    min-width: 0;
    flex: 1;
}

.cart-item-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.cart-item-unit-price {
    color: var(--text-light);
    font-weight: 700;
    white-space: nowrap;
}

.cart-item-line-total {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 16px;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-item-details {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 10px;
    padding: 4px 0;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 0;
    white-space: nowrap;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-quantity {
    background: var(--white);
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-color);
}

.btn-quantity:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.item-quantity {
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    font-size: 15px;
}

.btn-remove {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.btn-remove:hover {
    opacity: 1;
}

.cart-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-color);
    background: var(--white);
    flex-shrink: 0;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.cart-total-value {
    color: var(--primary-color);
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-cart-back {
    width: 30%;
    min-height: 52px;
    padding: 14px 10px;
    background: #FDBA74;
    color: var(--dark-color);
    border: 1px solid #FB923C;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cart-back:hover {
    background: #FB923C;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-cart-back:active {
    transform: translateY(0);
}

.btn-checkout {
    width: 70%;
    min-height: 52px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.22);
}

.btn-checkout:hover:not(:disabled) {
    background: #0D9668;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-checkout:active:not(:disabled) {
    transform: translateY(0);
}

.btn-checkout:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    color: var(--text-light);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
    backdrop-filter: blur(2px);
}

.overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-item {
        grid-template-columns: 150px 1fr auto;
        gap: 16px;
        padding: 16px;
    }
    
    .product-image-container {
        width: 150px;
        height: 150px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .product-price {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .header-content {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .header-search {
        max-width: none;
    }
    
    .search-input {
        min-height: 58px;
        padding: 12px 16px;
        font-size: 22px;
    }

    .search-keyboard {
        position: fixed;
        top: 118px;
        left: 8px;
        right: 8px;
        width: auto;
        max-width: calc(100vw - 16px);
        padding: 8px;
    }

    .search-keyboard .totem-key {
        min-height: 44px;
        font-size: 16px;
    }
    
    .cart-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .floating-order-button {
        left: calc(var(--sidebar-width) + 8px);
        right: 8px;
        bottom: 10px;
        min-height: 68px;
        border-radius: 12px;
        font-size: 22px;
    }

    .floating-order-count {
        min-width: 34px;
        height: 34px;
        font-size: 18px;
    }

    body.regular-product-add-active .floating-order-button,
    body.pizza-inline-add-active .floating-order-button {
        bottom: 94px;
    }
    
    /* Sidebar sempre visível em mobile */
    .sidebar {
        width: 220px;
        position: sticky;
        transform: none;
        z-index: 12000;
    }
    
    .sidebar-header {
        padding: 10px;
    }
    
    .sidebar-header h3 {
        display: none;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .categories-menu {
        padding: 5px;
    }
    
    .category-item {
        flex-direction: column;
        padding: 10px 6px;
        gap: 6px;
        margin-bottom: 8px;
    }
    
    .category-icon {
        font-size: 38px;
    }
    
    .category-text {
        flex-direction: column;
        gap: 3px;
    }
    
    .category-name {
        font-size: 20px;
        text-align: center;
        line-height: 1.2;
    }
    
    .category-count {
        font-size: 16px;
        padding: 2px 6px;
    }
    
    /* Layout 3 colunas em mobile */
    .main-content {
        padding: 8px;
    }
    
    .category-header {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .category-count-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .product-item {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        gap: 12px;
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .product-image-container {
        width: 112px;
        height: 112px;
        grid-row: 1 / span 2;
    }
    
    .product-details {
        gap: 4px;
        justify-content: flex-start;
    }

    .product-details .product-name {
        order: 1;
    }

    .product-details .product-category-top {
        order: 0;
    }

    .product-details .product-price {
        order: 2;
    }

    .product-details .product-description {
        order: 3;
    }
    
    .product-category-top {
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 2px;
    }
    
    .product-name {
        font-size: 18px;
        margin-bottom: 2px;
        line-height: 1.2;
    }
    
    .product-description {
        font-size: 14px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-category {
        font-size: 10px;
        padding: 2px 8px;
        margin-top: 4px;
    }
    
    .product-actions {
        grid-column: 2;
        grid-row: 2;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        align-self: end;
        margin-top: 0;
        gap: 8px;
    }
    
    .product-price {
        font-size: 24px;
    }
    
    .btn-add-product {
        padding: 8px 16px;
        font-size: 13px;
    }

    .regular-product-add-bar {
        left: var(--sidebar-width);
        padding: 12px 16px;
        gap: 12px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }

    body.regular-product-add-active .main-content {
        padding-bottom: 84px;
    }

    .regular-product-add-info strong {
        font-size: 13px;
    }

    .regular-product-add-info span {
        font-size: 14px;
    }

    .btn-add-product-bottom {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .cart-sidebar {
        width: calc(100% - var(--sidebar-width));
        display: flex;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }

    .cart-footer {
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .cart-items {
        padding-bottom: 118px;
    }

    .cart-total {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .btn-checkout {
        min-height: 48px;
        padding: 12px 14px;
    }

    .btn-cart-back {
        min-height: 48px;
        padding: 12px 10px;
    }

    .overlay {
        left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }

    #calzone-modal {
        left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        padding: 10px !important;
    }
}

body > .search-keyboard {
    left: 8px;
    right: 8px;
    z-index: 13000;
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
}

body > .search-keyboard .totem-keyboard-row {
    width: 100%;
}

@media (max-width: 720px) {
    body > .search-keyboard {
        top: 118px;
        padding: 8px;
    }

    body > .search-keyboard .totem-key {
        min-height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container-fluid {
        padding: 0 8px;
    }
    
    :root {
        --sidebar-width: 220px;
    }
    
    .sidebar {
        width: 220px;
        z-index: 12000;
    }
    
    .category-item {
        padding: 10px 6px;
    }
    
    .category-icon {
        font-size: 36px;
    }
    
    .category-name {
        font-size: 18px;
    }
    
    .category-count {
        font-size: 15px;
        padding: 1px 4px;
    }
    
    .category-header {
        padding: 12px;
        margin-bottom: 12px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .category-count-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .product-item {
        grid-template-columns: 96px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .product-image-container {
        width: 96px;
        height: 96px;
        grid-row: 1 / span 2;
    }
    
    .product-category-top {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .product-name {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .product-description {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 22px;
    }
    
    .btn-add-product {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* Tela inicial do totem */
.totem-name-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    z-index: 120000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #f7f8fa;
    overflow-x: hidden;
}

.totem-name-panel {
    width: min(760px, 94vw);
    max-width: calc(100vw - 64px);
    min-width: 0;
    min-height: 520px;
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 48px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

.totem-name-logo {
    max-width: 260px;
    max-height: 86px;
    object-fit: contain;
}

.totem-name-panel h1 {
    margin: 0;
    max-width: 100%;
    color: #1f2937;
    font-size: 44px;
    line-height: 1.12;
    font-weight: 700;
    text-align: center;
    overflow-wrap: anywhere;
}

.totem-name-input {
    width: min(560px, 100%);
    height: 86px;
    padding: 0 28px;
    border: 3px solid #d1d5db;
    border-radius: 8px;
    font-size: 38px;
    font-weight: 600;
    text-align: center;
    color: #111827;
    background: #fff;
}

.totem-name-input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.16);
}

.totem-start-button {
    width: min(560px, 100%);
    min-height: 88px;
    border: 0;
    border-radius: 8px;
    background: #ff6b35;
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    cursor: pointer;
}

.totem-name-keyboard-slot {
    width: min(720px, 100%);
    min-width: 0;
    overflow: hidden;
}

.totem-start-button:active {
    transform: translateY(1px);
}

.totem-customer-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
}

@media (max-width: 720px) {
    .totem-name-panel {
        min-height: 460px;
        padding: 30px 20px;
    }
    .totem-name-panel h1 {
        font-size: 34px;
    }
    .totem-name-input {
        height: 76px;
        font-size: 30px;
    }
    .totem-start-button {
        min-height: 78px;
        font-size: 28px;
    }
}


.totem-keyboard {
    width: min(720px, 100%);
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    user-select: none;
}

.totem-keyboard-row {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.totem-keyboard-row--middle {
    padding: 0 34px;
    grid-template-columns: repeat(9, minmax(0, 1fr));
}

.totem-keyboard-row--bottom {
    grid-template-columns: repeat(10, minmax(0, 1fr));
}

.totem-key {
    min-width: 0;
    min-height: 62px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 2px 0 #d1d5db;
    overflow: hidden;
    white-space: nowrap;
}

.totem-key:active {
    transform: translateY(2px);
    box-shadow: none;
    background: #eef2f7;
}

.totem-key--wide {
    grid-column: span 2;
    font-size: 22px;
}

.totem-key--space {
    grid-column: span 3;
    font-size: 22px;
}

.totem-key--danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.totem-key--ok {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

@media (max-width: 720px) {
    .totem-name-screen {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .totem-name-panel {
        width: min(360px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        min-height: 0;
        max-height: none;
        gap: 12px;
        padding: 28px 18px 24px;
    }

    .totem-name-logo {
        max-width: 170px;
        max-height: 58px;
    }

    .totem-name-panel h1 {
        font-size: 22px;
        line-height: 1.16;
    }

    .totem-name-input {
        height: 48px;
        padding: 0 14px;
        border-width: 2px;
        font-size: 22px;
    }

    .totem-start-button {
        min-height: 52px;
        font-size: 20px;
    }

    .totem-keyboard {
        gap: 5px;
    }
    .totem-keyboard-row {
        gap: 4px;
    }
    .totem-keyboard-row--middle {
        padding: 0 10px;
    }
    .totem-key {
        min-height: 34px;
        border-radius: 6px;
        font-size: 13px;
        box-shadow: 0 1px 0 #d1d5db;
    }
    .totem-key--wide,
    .totem-key--space {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .totem-name-panel {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Totem: cards de produtos maiores para leitura em tela touch */
.products-list {
    max-width: 1440px;
}

.product-item {
    grid-template-columns: 260px minmax(0, 1fr) auto;
    gap: 26px;
    padding: 24px;
}

.product-image-container {
    width: 260px;
    height: 260px;
}

.product-details {
    gap: 10px;
}

.product-category-top {
    font-size: 13px;
}

.product-name {
    font-size: 28px;
    line-height: 1.18;
}

.product-description {
    font-size: 18px;
    line-height: 1.42;
}

.product-price {
    font-size: 40px;
    line-height: 1.05;
}

.btn-add-product {
    font-size: 18px;
    padding: 14px 28px;
}

@media (max-width: 1024px) {
    .product-item {
        grid-template-columns: 200px minmax(0, 1fr) auto;
        gap: 20px;
        padding: 20px;
    }

    .product-image-container {
        width: 200px;
        height: 200px;
    }

    .product-name {
        font-size: 24px;
    }

    .product-description {
        font-size: 16px;
    }

    .product-price {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    .product-item {
        grid-template-columns: 150px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .product-image-container {
        width: 150px;
        height: 150px;
    }

    .product-name {
        font-size: 24px;
    }

    .product-description {
        font-size: 16px;
        -webkit-line-clamp: 4;
    }

    .product-price {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .product-item {
        grid-template-columns: 124px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .product-image-container {
        width: 124px;
        height: 124px;
    }

    .product-name {
        font-size: 20px;
    }

    .product-description {
        font-size: 14px;
    }

    .product-price {
        font-size: 28px;
    }
}

/* Totem: botao inferior de adicionar maior */
.regular-product-add-bar {
    min-height: 96px;
    padding: 18px 28px;
}

.regular-product-add-info strong {
    font-size: 22px;
    font-weight: 800;
}

.regular-product-add-info span {
    font-size: 24px;
}

.btn-add-product-bottom {
    min-height: 68px;
    padding: 18px 44px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .regular-product-add-bar {
        min-height: 88px;
        padding: 14px 18px;
    }

    .regular-product-add-info strong {
        font-size: 18px;
    }

    .regular-product-add-info span {
        font-size: 20px;
    }

    .btn-add-product-bottom {
        min-height: 62px;
        padding: 16px 34px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .regular-product-add-info strong {
        font-size: 16px;
    }

    .regular-product-add-info span {
        font-size: 18px;
    }

    .btn-add-product-bottom {
        min-height: 56px;
        padding: 14px 28px;
        font-size: 20px;
    }
}

/* Totem: carrinho "Seu Pedido" com leitura maior */
.cart-sidebar {
    width: 560px;
}

.cart-header {
    padding: 22px 24px;
}

.cart-header h2 {
    font-size: 32px;
    line-height: 1.15;
}

.cart-items {
    padding: 22px 22px 170px;
}

.empty-cart p {
    font-size: 24px;
    font-weight: 700;
}

.cart-item {
    gap: 14px;
    padding: 16px;
    margin-bottom: 14px;
}

.cart-item-image {
    width: 82px;
    height: 82px;
}

.cart-item-name {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
}

.cart-item-line-total {
    font-size: 24px;
}

.cart-item-details {
    font-size: 20px;
    line-height: 1.35;
}

.cart-item-price {
    font-size: 24px;
}

.btn-quantity {
    width: 46px;
    height: 46px;
    font-size: 24px;
}

.item-quantity {
    min-width: 34px;
    font-size: 22px;
    font-weight: 800;
}

.btn-remove {
    font-size: 24px;
}

.cart-footer {
    padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
}

.cart-total {
    font-size: 28px;
    margin-bottom: 16px;
}

.btn-cart-back,
.btn-checkout {
    min-height: 68px;
    font-size: 22px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .cart-header {
        padding: 18px 18px;
    }

    .cart-header h2 {
        font-size: 28px;
    }

    .cart-items {
        padding: 18px 16px 156px;
    }

    .cart-item {
        gap: 12px;
        padding: 14px;
    }

    .cart-item-image {
        width: 72px;
        height: 72px;
    }

    .cart-item-name {
        font-size: 20px;
    }

    .cart-item-line-total {
        font-size: 22px;
    }

    .cart-item-details {
        font-size: 18px;
    }

    .cart-item-price {
        font-size: 22px;
    }

    .cart-total {
        font-size: 24px;
    }

    .btn-cart-back,
    .btn-checkout {
        min-height: 62px;
        font-size: 20px;
    }
}

/* Totem: modal de observacao e quantidade do item */
.calzone-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.calzone-modal-content {
    width: min(920px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.calzone-modal-body {
    margin-bottom: 22px;
}

.calzone-modal-title {
    margin: 0 0 18px;
    color: #2C3E50;
    font-size: 34px;
    line-height: 1.15;
    font-weight: 800;
}

.calzone-observacao-label,
.calzone-quantity-label {
    display: block;
    margin-bottom: 10px;
    color: #2C3E50;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
}

.calzone-observacao {
    width: 100%;
    min-height: 116px;
    padding: 18px;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    font-size: 26px;
    line-height: 1.3;
    resize: none;
    box-sizing: border-box;
}

.calzone-observacao:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.16);
}

.calzone-observation-keyboard {
    width: 100%;
    margin-top: 16px;
}

.calzone-observation-keyboard .totem-key {
    min-height: 58px;
    font-size: 24px;
}

.calzone-key--ok {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.calzone-quantity-row {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calzone-quantity-label {
    margin-bottom: 0;
    width: 100%;
    color: #fff;
    background: #10B981;
    padding: 0 8px;
    border-radius: 12px;
    white-space: nowrap;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(38px, 4.8vw, 52px);
    font-weight: 900;
    letter-spacing: 0;
    text-align: center;
}

.calzone-quantity-control {
    display: grid;
    grid-template-columns: 1fr 1.25fr 1fr;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calzone-quantity-btn {
    width: 100%;
    height: 88px;
    border: none;
    border-radius: 14px;
    background: #FF6B35;
    color: #fff;
    font-size: 50px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
}

.calzone-quantity-input {
    width: 100%;
    height: 88px;
    padding: 0 10px;
    border: 2px solid #d1d5db;
    border-radius: 14px;
    font-size: 38px;
    font-weight: 800;
    text-align: center;
    box-sizing: border-box;
}

.calzone-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calzone-confirm-btn,
.calzone-cancel-btn {
    width: 100%;
    min-height: 72px;
    border-radius: 12px;
    font-size: 26px;
    font-weight: 800;
    cursor: pointer;
}

.calzone-confirm-btn {
    border: none;
    background: #FF6B35;
    color: #fff;
}

.calzone-cancel-btn {
    border: 2px solid #d1d5db;
    background: #f5f5f5;
    color: #4b5563;
    font-size: 32px;
}

@media (max-width: 768px) {
    .calzone-modal {
        left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        padding: 10px;
    }

    .calzone-modal-content {
        width: 100%;
        padding: 22px;
    }

    .calzone-modal-title {
        font-size: 28px;
    }

    .calzone-observacao-label,
    .calzone-quantity-label {
        font-size: 20px;
    }

    .calzone-observacao {
        min-height: 96px;
        font-size: 22px;
    }

    .calzone-observation-keyboard .totem-key {
        min-height: 50px;
        font-size: 19px;
    }

    .calzone-quantity-control {
        grid-template-columns: 1fr 1.2fr 1fr;
        gap: 5px;
    }

    .calzone-quantity-label {
        min-height: 76px;
        padding: 0 6px;
        font-size: clamp(30px, 4.5vw, 40px);
    }

    .calzone-quantity-btn,
    .calzone-quantity-input {
        height: 76px;
    }

    .calzone-quantity-btn {
        font-size: 42px;
    }

    .calzone-quantity-input {
        font-size: 32px;
    }

    .calzone-confirm-btn,
    .calzone-cancel-btn {
        min-height: 62px;
        font-size: 22px;
    }

    .calzone-cancel-btn {
        font-size: 26px;
    }
}

/* Override final: mantém "Ver meu pedido" no rodapé e botões de ação acima. */
body.regular-product-add-active .floating-order-button,
body.pizza-inline-add-active .floating-order-button {
    bottom: 18px;
}

.regular-product-add-bar {
    bottom: 112px;
}

body.regular-product-add-active .main-content,
body.pizza-inline-add-active .main-content {
    padding-bottom: 230px;
}

@media (max-width: 768px) {
    body.regular-product-add-active .floating-order-button,
    body.pizza-inline-add-active .floating-order-button {
        bottom: 10px;
    }

    .regular-product-add-bar {
        bottom: 86px;
    }

    body.regular-product-add-active .main-content,
    body.pizza-inline-add-active .main-content {
        padding-bottom: 190px;
    }
}
