/* TAKE - Frontend Styles */
:root {
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-rgb: 255,107,53;
    --secondary: #1a1a2e;
    --bg: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--gray-900);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Menu Page */
.menu-page {
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Header */
.menu-header {
    background: linear-gradient(135deg, #fff8f5 0%, #ffffff 70%);
    padding: 1rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.btn-header-bill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: transparent;
    border: 1.5px solid var(--primary);
    border-radius: 99px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.btn-header-bill:active {
    background: var(--primary);
    color: #fff;
}

.closed-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: #fff3cd;
    color: #856404;
    font-size: 0.85rem;
    border-bottom: 1px solid #ffc107;
}

/* PWA Install Banner */
.pwa-install-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    color: white;
    font-size: 0.85rem;
    gap: 0.75rem;
}

.pwa-install-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-install-btn {
    padding: 0.35rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.pwa-dismiss-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

/* PWA Standalone mode */
@media (display-mode: standalone) {
    .menu-header {
        padding-top: calc(env(safe-area-inset-top, 0px) + 1rem);
    }

    .pwa-install-banner {
        display: none !important;
    }
}

.closed-banner strong {
    display: block;
    font-size: 0.9rem;
}

.closed-banner span {
    font-size: 0.8rem;
    opacity: 0.85;
}

.restaurant-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.restaurant-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.restaurant-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.restaurant-details h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.table-name {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--white);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: sticky;
    top: 80px;
    z-index: 90;
    border-bottom: 1px solid var(--gray-200);
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex-shrink: 0;
    padding: 0.5rem 1.125rem;
    border-radius: 50px;
    background: var(--gray-100);
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-tab:hover {
    background: var(--gray-200);
}

.category-tab.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

/* Menu Content */
.menu-content {
    padding: 1rem;
}

/* Category Section */
.category-section {
    margin-bottom: 1.75rem;
    scroll-margin-top: 140px;
}

.category-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

/* Menu Items */
.menu-items {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.menu-item {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

@media (hover: hover) {
    .menu-item:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
        transform: translateY(-1px);
    }
}

.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

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

.item-content {
    flex: 1;
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--warning);
    color: var(--gray-900);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.item-description {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.item-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: auto;
}

.variant-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 4px;
}

.variant-tag small {
    color: var(--primary);
    font-weight: 500;
}

.item-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.item-time svg {
    opacity: 0.7;
}

/* Add to Cart Button */
.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
    margin: 0 0.75rem;
    background: var(--primary);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
}

.add-to-cart-btn:active {
    transform: scale(0.9);
}

.add-to-cart-btn.added {
    background: var(--success);
}

.add-to-cart-btn svg {
    transition: transform 0.3s ease;
}

.add-to-cart-btn.added svg {
    animation: addedSpin 0.4s ease;
}

/* Cards con imagen: layout vertical */
.menu-item.has-image {
    flex-direction: column;
    position: relative;
}

.menu-item.has-image .item-image {
    width: 100%;
    height: 160px;
    position: relative;
    flex-shrink: 0;
}

.menu-item.has-image .item-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 48px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15));
    pointer-events: none;
}

.menu-item.has-image .item-header {
    flex-direction: column;
    gap: 0.125rem;
    margin-bottom: 0.375rem;
}

.menu-item.has-image .item-price {
    font-size: 1.125rem;
}

.menu-item.has-image .add-to-cart-btn {
    position: absolute;
    bottom: 0.875rem;
    right: 0.875rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-self: auto;
    margin: 0;
    box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.45);
}

@keyframes addedSpin {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(90deg); }
    100% { transform: scale(1) rotate(90deg); }
}

/* Cart Button (Floating) */
.cart-button {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    z-index: 200;
    animation: cartSlideUp 0.3s ease;
}

@keyframes cartSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cart-button button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}

.cart-button button:hover {
    background: var(--primary-dark);
}

.cart-button button:active {
    transform: scale(0.98);
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.5rem;
    background: rgba(255,255,255,0.25);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
}

.cart-label {
    font-weight: 600;
}

.cart-total {
    margin-left: auto;
    font-weight: 700;
}

.cart-button.bounce button {
    animation: cartBounce 0.4s ease;
}

@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.05); }
    60% { transform: scale(0.97); }
    100% { transform: scale(1); }
}

/* Error Page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-content h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Responsive */
@media (min-width: 640px) {
    .menu-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .menu-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .menu-item {
        flex-direction: column;
    }

    .item-image {
        width: 100%;
        height: 140px;
    }

    .add-to-cart-btn {
        width: 100%;
        height: 44px;
        border-radius: 0;
        align-self: auto;
        margin: 0;
    }

    /* Cards con imagen en tablet: mantener botón circular absoluto */
    .menu-item.has-image .add-to-cart-btn {
        position: absolute;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        bottom: 0.875rem;
        right: 0.875rem;
    }

    .cart-button {
        max-width: 432px;
        left: 0;
        right: 0;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .menu-content {
        max-width: 900px;
    }

    .menu-items {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Body Scroll Lock ===== */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    to { transform: scale(1); opacity: 1; }
}

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

/* ===== Buttons ===== */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

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

.modal-item-price {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-200);
}

/* Variant Options */
.variant-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-option {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.variant-option:has(input:checked) {
    border-color: var(--primary);
    background: #fff5f0;
}

.variant-option input[type="radio"] {
    display: none;
}

.variant-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.variant-option-name {
    font-size: 0.9375rem;
    font-weight: 500;
}

.variant-option-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

/* ===== Cart Drawer ===== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 299;
    animation: fadeIn 0.2s ease;
}

.cart-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    z-index: 300;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}

.cart-drawer.open {
    transform: translateY(0);
}

.cart-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 0.75rem;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.25rem 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.cart-drawer-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.cart-empty {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray-500);
}

/* Cart Item */
.cart-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.cart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cart-item-name {
    font-size: 0.9375rem;
    font-weight: 500;
    flex: 1;
    margin-right: 0.75rem;
}

.cart-item-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: background 0.2s ease;
}

.qty-btn:hover {
    background: var(--gray-200);
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
}

.cart-item-remove:hover {
    color: var(--danger);
    background: #fef2f2;
}

.cart-item-notes {
    margin-top: 0.25rem;
}

.item-note-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--gray-700);
    background: var(--gray-100);
    transition: border-color 0.2s ease;
}

.item-note-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.item-note-input::placeholder {
    color: var(--gray-400);
}

/* Cart Notes */
.cart-drawer-notes {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--gray-200);
}

.cart-drawer-notes label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.375rem;
}

.cart-drawer-notes textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--gray-700);
    resize: none;
    background: var(--gray-100);
    transition: border-color 0.2s ease;
}

.cart-drawer-notes textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

/* Cart Footer */
.cart-drawer-footer {
    padding: 1rem 1.25rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gray-200);
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.875rem;
}

.btn-submit-order {
    position: relative;
}

.btn-submit-order.loading {
    color: transparent;
    pointer-events: none;
}

.btn-submit-order.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Order Confirmation ===== */
.order-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 350;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 2rem 2rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.confirmation-icon {
    margin-bottom: 1.5rem;
    animation: confirmBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.confirmation-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
    animation: confirmRipple 1s ease-out;
}

@keyframes confirmBounce {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes confirmRipple {
    0% { transform: scale(0.5); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

.order-confirmation h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    animation: fadeSlideUp 0.4s ease 0.2s both;
}

.confirmation-order-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    animation: fadeSlideUp 0.4s ease 0.3s both;
}

.confirmation-eta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff8e1;
    color: #b45309;
    border: 1px solid #fde68a;
    border-radius: 99px;
    padding: 0.3rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    animation: fadeSlideUp 0.4s ease 0.4s both;
}

.confirmation-items {
    width: 100%;
    max-width: 320px;
    background: var(--gray-50);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    animation: fadeSlideUp 0.4s ease 0.45s both;
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.confirmation-item + .confirmation-item {
    border-top: 1px solid var(--gray-200);
}

.confirmation-item-name {
    text-align: left;
    flex: 1;
    margin-right: 0.75rem;
}

.confirmation-item-qty {
    font-weight: 700;
    color: var(--primary);
}

.confirmation-item-price {
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
}

.confirmation-total {
    width: 100%;
    max-width: 320px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 1.75rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
    border-top: 2px solid var(--gray-300);
    animation: fadeSlideUp 0.4s ease 0.5s both;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.order-confirmation .btn-primary,
.order-confirmation .btn-secondary {
    max-width: 300px;
    margin-bottom: 0.75rem;
    animation: fadeSlideUp 0.4s ease 0.6s both;
}

/* Confetti particles */
.order-confirmation::before,
.order-confirmation::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.order-confirmation::before {
    top: 20%;
    left: 15%;
    background: var(--primary);
    animation: confetti1 1.5s ease-out 0.3s both;
}

.order-confirmation::after {
    top: 25%;
    right: 20%;
    background: var(--success);
    animation: confetti2 1.5s ease-out 0.5s both;
}

@keyframes confetti1 {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(200px) rotate(720deg); opacity: 0; }
}

@keyframes confetti2 {
    0% { transform: translateY(0) rotate(0deg) scale(1.2); opacity: 1; }
    100% { transform: translateY(250px) rotate(-540deg); opacity: 0; }
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
    overflow: hidden;
}

.toast::before {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    animation: toastDismiss 4s linear forwards;
}

@keyframes toastDismiss {
    from { width: 100%; }
    to { width: 0%; }
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.toast-error::after {
    background: #dc3545;
}

.toast-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.toast-success::after {
    background: #28a745;
}

.toast-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.toast-info::after {
    background: #3b82f6;
}

/* ===== Order Tracking ===== */
.order-tracking {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 350;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #fff8f5 0%, #ffffff 70%);
    border-bottom: 3px solid var(--primary);
}

.tracking-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.tracking-back {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.375rem 0;
    font-family: inherit;
}

.tracking-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
}

.tracking-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

/* Tracking Order Card */
.tracking-order {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.tracking-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.875rem;
}

.tracking-order-number {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
}

.tracking-order-time {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

.tracking-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    animation: badgeFadeIn 0.3s ease;
}

.tracking-status-badge[style*="ffc107"],
.tracking-status-badge[style*="17a2b8"],
.tracking-status-badge[style*="6f42c1"] {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes badgeFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.tracking-order-items {
    border-top: 1px solid var(--gray-100);
    padding-top: 0.75rem;
}

.tracking-item {
    display: flex;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.tracking-item-qty {
    color: var(--gray-500);
    font-weight: 500;
    margin-right: 0.5rem;
    min-width: 2rem;
}

.tracking-item-body {
    flex: 1;
}

.tracking-item-name {
    display: block;
    color: var(--gray-700);
}

.tracking-item-notes {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 0.125rem;
}

.tracking-item-price {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.tracking-item-cancel {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.tracking-item-cancel:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.tracking-item-cancel:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tracking-cancel-countdown {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: right;
    padding: 0.25rem 0 0.375rem;
}

.tracking-cancel-timer {
    font-weight: 700;
    color: var(--primary);
}

.tracking-item-cancelled {
    opacity: 0.45;
    text-decoration: line-through;
}

.tracking-order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Progress Bar */
.tracking-progress {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.875rem 0 0.75rem;
    position: relative;
}

.tracking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.tracking-step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 2px solid var(--gray-300);
    z-index: 1;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tracking-step.active .tracking-step-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.15);
}

.tracking-step.done .tracking-step-dot {
    background: var(--success);
    border-color: var(--success);
}

.tracking-step-line {
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gray-200);
    z-index: 0;
}

.tracking-step-line.done {
    background: var(--success);
}

.tracking-step-label {
    font-size: 0.5875rem;
    margin-top: 0.375rem;
    color: var(--gray-400);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

.tracking-step.active .tracking-step-label,
.tracking-step.done .tracking-step-label {
    color: var(--gray-700);
    font-weight: 600;
}

.tracking-cancelled {
    text-align: center;
    padding: 0.625rem 1rem;
    background: #fef2f2;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.tracking-empty-sub {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-top: 0.375rem;
}

/* Tracking Footer */
.tracking-footer {
    padding: 1rem 1.25rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--gray-200);
}

.btn-call-waiter {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: transparent;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-call-waiter:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-call-waiter:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tracking Bill Status (inside footer) */
.tracking-bill-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #eff6ff;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.tracking-bill-icon {
    color: #2563eb;
    animation: spin 2s linear infinite;
    flex-shrink: 0;
}

.tracking-bill-text strong {
    display: block;
    font-size: 0.9375rem;
    color: #1e40af;
}

.tracking-bill-text span {
    font-size: 0.8125rem;
    color: #3b82f6;
}

/* Active Orders Badge */
.orders-badge {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    animation: fadeIn 0.3s ease;
    flex-shrink: 0;
}

.orders-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    font-size: 0.6875rem;
    margin-right: 0.25rem;
}

/* ===== Responsive - New Components ===== */
@media (min-width: 640px) {
    .cart-drawer {
        max-width: 500px;
        left: 50%;
        margin-left: -250px;
        max-height: 85vh;
    }

    .order-confirmation .btn-primary,
    .order-confirmation .btn-secondary {
        max-width: 320px;
    }

    .tracking-body {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

/* ===== Bill Request ===== */
.btn-request-bill {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-bottom: 0.5rem;
}

.btn-request-bill:hover {
    background: var(--primary-dark);
}

.btn-request-bill:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bill Modal */
.bill-summary {
    margin-bottom: 1.25rem;
}

.bill-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.bill-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0 0;
    font-weight: 700;
    font-size: 1rem;
    border-top: 2px solid var(--gray-200);
    margin-top: 0.25rem;
}

.bill-form-group {
    margin-bottom: 1.25rem;
}

.bill-form-group > label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.bill-method-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.bill-method-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    color: var(--gray-600);
}
.bill-method-option svg {
    transition: stroke 0.2s;
}

.bill-method-option input { display: none; }

.bill-method-option.selected,
.bill-method-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--primary);
    font-weight: 600;
}
.bill-method-option.selected svg,
.bill-method-option:has(input:checked) svg {
    stroke: var(--primary);
}

/* Guests stepper */
.bill-guests-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bill-guests-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.bill-guests-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-700);
    transition: background 0.15s;
    font-family: inherit;
    line-height: 1;
}

.bill-guests-btn:active {
    background: var(--gray-200);
}

.bill-guests-num {
    min-width: 40px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.bill-per-person {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: #e8f5e9;
    border-radius: 99px;
    font-size: 0.8125rem;
    color: #2e7d32;
}

/* Pay amount input */
.bill-pay-wrap {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.bill-pay-wrap:focus-within {
    border-color: var(--primary);
}

.bill-pay-currency {
    padding: 0.75rem;
    background: var(--gray-100);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    border-right: 1px solid var(--gray-200);
}

.bill-pay-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    outline: none;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
}

.bill-pay-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
    font-size: 0.9rem;
}

.bill-pay-tip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #e8f5e9;
    border-radius: 99px;
    font-size: 0.8125rem;
    color: #2e7d32;
    width: fit-content;
}

.bill-pay-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #fef2f2;
    border-radius: 99px;
    font-size: 0.8125rem;
    color: #dc2626;
    width: fit-content;
}

/* Tip preview in grand total */
.bill-tip-preview {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-top: 0.25rem;
    text-align: right;
}

.bill-grand-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Bill Pending Banner */
.bill-pending-banner {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    border-radius: 99px;
    z-index: 250;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
    animation: fadeSlideDown 0.3s ease;
    font-size: 0.8125rem;
    color: #1e40af;
    max-width: calc(100vw - 2rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.bill-pending-banner svg {
    flex-shrink: 0;
    animation: spin 2s linear infinite;
    color: #2563eb;
}

.bill-pending-banner strong {
    font-weight: 600;
}

.bill-pending-banner #billPendingStatus {
    color: #3b82f6;
    font-size: 0.75rem;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Landing TAKE (genérica) ===== */
.welcome-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(var(--primary-rgb), 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(var(--primary-rgb), 0.05) 0%, transparent 50%);
    animation: ambientFloat 20s ease-in-out infinite;
}

@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-brand {
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.6s ease both;
}

.welcome-brand h1 {
    font-size: 4.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9a76 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.welcome-brand p {
    font-size: 1.125rem;
    color: var(--gray-400);
    font-weight: 400;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2.5rem 0;
    max-width: 280px;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-align: left;
    animation: fadeSlideUp 0.5s ease both;
}

.welcome-feature:nth-child(1) { animation-delay: 0.2s; }
.welcome-feature:nth-child(2) { animation-delay: 0.35s; }
.welcome-feature:nth-child(3) { animation-delay: 0.5s; }

.welcome-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.welcome-feature-text {
    font-size: 0.9375rem;
    color: var(--gray-300);
    line-height: 1.4;
}

.welcome-feature-text strong {
    display: block;
    color: var(--white);
    font-weight: 600;
}

.welcome-footer {
    margin-top: 3rem;
    font-size: 0.75rem;
    color: var(--gray-600);
    animation: fadeSlideUp 0.5s ease 0.6s both;
}

/* ===== Landing Page (SaaS) ===== */
.landing-page {
    background: #fff;
    color: var(--gray-900);
}

.landing-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

.landing-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
}

.landing-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%);
}

.landing-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.landing-logo {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #ff9a76 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 1rem;
    animation: fadeSlideUp 0.6s ease both;
}

.landing-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    animation: fadeSlideUp 0.6s ease 0.15s both;
}

.landing-subtitle {
    font-size: 1rem;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.6s ease 0.3s both;
}

.landing-cta {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s, transform 0.1s;
    animation: fadeSlideUp 0.6s ease 0.45s both;
}

.landing-cta:active {
    transform: scale(0.97);
}

/* Sections */
.landing-section {
    padding: 4rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.landing-section-dark {
    background: var(--gray-50);
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.landing-section-dark > * {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.landing-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.landing-section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
}

/* Steps */
.landing-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.landing-step {
    text-align: center;
    padding: 1.5rem;
}

.landing-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.landing-step-icon {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.landing-step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.landing-step p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Feature cards */
.landing-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.landing-feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.landing-feature-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.landing-feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.landing-feature-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Benefits */
.landing-benefits {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.landing-benefit {
    text-align: center;
    padding: 1.5rem;
}

.landing-benefit-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.landing-benefit-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.landing-benefit p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* CTA Section */
.landing-cta-section {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    padding: 4rem 1.5rem;
    text-align: center;
    color: #fff;
}

.landing-cta-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-cta-section p {
    color: var(--gray-400);
    margin-bottom: 2rem;
}

.landing-cta-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    animation: none;
}

/* Footer */
.landing-footer {
    padding: 2rem 1.5rem;
    text-align: center;
    background: #0a0a1a;
    color: var(--gray-500);
}

.landing-footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.landing-footer p {
    font-size: 0.8125rem;
}

/* Responsive: tablet+ */
@media (min-width: 600px) {
    .landing-steps {
        grid-template-columns: repeat(3, 1fr);
    }
    .landing-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .landing-benefits {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Restaurant Landing ===== */
.restaurant-landing {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.restaurant-landing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.15) 0%, transparent 100%);
    pointer-events: none;
}

.restaurant-landing-content {
    position: relative;
    z-index: 1;
    max-width: 360px;
    width: 100%;
}

.restaurant-landing-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.5s ease both;
}

.restaurant-landing-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: rgba(var(--primary-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: fadeSlideUp 0.5s ease both;
}

.restaurant-landing-logo-placeholder span {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.05em;
    line-height: 1;
}

.restaurant-landing h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    animation: fadeSlideUp 0.5s ease 0.1s both;
}

.restaurant-landing-info {
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.5s ease 0.2s both;
}

.restaurant-landing-info p {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.restaurant-landing-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255,255,255,0.08);
    border-radius: 50px;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.5s ease 0.3s both;
}

.restaurant-landing-status.open {
    color: #4ade80;
}

.restaurant-landing-status.closed {
    color: #f87171;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-dot.pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px transparent; }
}

.restaurant-landing-status span {
    font-size: 0.9375rem;
    font-weight: 600;
}


/* Horarios semanales */
.rl-hours {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.25rem 1rem;
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.5s ease 0.35s both;
}

.rl-hours-table {
    width: 100%;
    border-collapse: collapse;
}

.rl-hours-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rl-hours-table tr:last-child {
    border-bottom: none;
}

.rl-hours-table tr.today .rl-day-name {
    color: var(--white);
    font-weight: 600;
}

.rl-hours-table tr.today .rl-day-hours {
    color: var(--primary);
    font-weight: 600;
}

.rl-day-name {
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    color: var(--gray-400);
    text-align: left;
    width: 50%;
}

.rl-day-hours {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-align: right;
}

.rl-closed {
    color: var(--gray-600);
}

/* Link de contacto (teléfono) */
.rl-contact-link {
    color: var(--gray-400);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s ease;
}

.rl-contact-link:hover {
    color: var(--white);
}

/* 3 pasos */
.rl-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 1.75rem;
    animation: fadeSlideUp 0.5s ease 0.4s both;
}

.rl-step {
    text-align: center;
    flex: 1;
}

.rl-step-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: var(--primary);
}

.rl-step p {
    font-size: 0.6875rem;
    color: var(--gray-400);
    line-height: 1.3;
}

.rl-step-arrow {
    color: var(--gray-600);
    font-size: 1.25rem;
    flex-shrink: 0;
    padding-top: 0.875rem;
}

/* Footer */
.rl-footer {
    font-size: 0.75rem;
    color: var(--gray-600);
    animation: fadeSlideUp 0.5s ease 0.45s both;
}

.rl-footer strong {
    color: var(--gray-500);
}

/* ===== Category Title Decorator ===== */
.category-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title::before {
    content: '';
    width: 4px;
    height: 1.25em;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== Active Orders Badge Pulse ===== */
.orders-badge {
    animation: fadeIn 0.3s ease, ordersBadgePulse 2s ease-in-out 0.5s 3;
}

@keyframes ordersBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===== Onboarding Tutorial ===== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 450;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.onboarding-overlay.closing {
    animation: onboardingFadeOut 0.3s ease forwards;
}

@keyframes onboardingFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.onboarding-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    position: relative;
}

.onboarding-skip {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
}

.onboarding-dots {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.onboarding-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.onboarding-steps {
    width: 100%;
    text-align: center;
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-step {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: onboardingStepIn 0.3s ease;
}

.onboarding-step.active {
    display: flex;
}

@keyframes onboardingStepIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.onboarding-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.onboarding-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.onboarding-text {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
    max-width: 300px;
}

.onboarding-text strong {
    color: var(--primary);
    font-weight: 600;
}

.onboarding-nav {
    margin-top: 2.5rem;
    width: 100%;
    max-width: 280px;
}

.onboarding-btn-next,
.onboarding-btn-start {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.1s ease;
}

.onboarding-btn-next {
    background: var(--gray-100);
    color: var(--gray-800);
}

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

.onboarding-btn-start {
    background: var(--primary);
    color: var(--white);
}

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

body.no-scroll {
    overflow: hidden;
}

@media (display-mode: standalone) {
    .onboarding-skip {
        top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
    }
}

/* ============================================
   Modal Comensales
   ============================================ */
.covers-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
}
.covers-modal {
    background: #fff; border-radius: 28px 28px 0 0;
    padding: 2.5rem 2rem 3rem; text-align: center;
    width: 100%; max-width: 480px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.25);
    animation: covers-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes covers-in {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.covers-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.covers-modal h2 { margin: 0 0 0.4rem; font-size: 1.9rem; font-weight: 800; color: #1a202c; }
.covers-modal p  { margin: 0 0 1.5rem; color: #718096; font-size: 1.15rem; }
.covers-selector {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 2rem;
    border: 3px solid #e2e8f0; border-radius: 20px; overflow: hidden;
}
.covers-btn {
    width: 90px; height: 90px; flex-shrink: 0;
    border: none; background: #f7fafc;
    color: var(--primary, #ff6b35);
    font-size: 2.5rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.covers-btn:active { background: var(--primary, #ff6b35); color: #fff; }
.covers-input {
    flex: 1; border: none; outline: none;
    font-size: 3.5rem; font-weight: 900; color: #1a202c;
    text-align: center; background: #fff;
    min-width: 0; padding: 0;
    -moz-appearance: textfield;
}
.covers-input::-webkit-outer-spin-button,
.covers-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.covers-confirm {
    width: 100%; padding: 1.2rem;
    background: var(--primary, #ff6b35); color: #fff;
    border: none; border-radius: 16px;
    font-size: 1.35rem; font-weight: 800; cursor: pointer;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.covers-confirm:active { opacity: 0.85; }
