@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ff6b00;
    --primary-hover: #e65f00;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #1a1d23;
    --text-muted: #718096;
    --border: #edf2f7;
    --success: #10b981;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 100px; /* Space for cart bar */
}

/* Header */
.app-header {
    background: var(--bg-white);
    padding: 1.5rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.restaurant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), #ff9500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

.restaurant-info h1 {
    font-size: 1.1rem;
    font-weight: 700;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.btn-icon-round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Categories Nav */
.categories-nav {
    display: flex;
    gap: 12px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    background: var(--bg-white);
    white-space: nowrap;
    scrollbar-width: none;
    position: sticky;
    top: 80px;
    z-index: 90;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 0.6rem 1.2rem;
    background: var(--bg-light);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-pill.active {
    background: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    border-color: rgba(255, 107, 0, 0.2);
}

/* Menu Content */
.app-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

.menu-section {
    margin-bottom: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s;
}

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

.product-img-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-right-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 8px;
}

/* Card Quantity Control */
.card-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
    border: 1px solid var(--border);
}

.btn-card-qty {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg-white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.btn-card-qty:active {
    transform: scale(0.9);
}

.card-qty-value {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
    color: var(--text-main);
}

/* Cart Bar */
.cart-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 64px;
    background: var(--text-main);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: white;
    z-index: 200;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-icon-wrapper {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-main);
}

.cart-text {
    display: flex;
    flex-direction: column;
}

.cart-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.cart-total {
    font-weight: 700;
}

.btn-checkout {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Modal Product */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.modal-overlay.active {
    display: flex;
}

.modal-product-content {
    background: var(--bg-white);
    width: 100%;
    height: 90vh;
    border-radius: 30px 30px 0 0;
    position: relative;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.btn-close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.modal-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-header-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.options-group {
    margin-top: 2rem;
}

.options-title {
    background: var(--bg-light);
    padding: 0.8rem 1.5rem;
    margin: 0 -1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

.mandatory-badge {
    background: var(--text-main);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border);
}

.option-info {
    display: flex;
    flex-direction: column;
}

.option-name {
    font-weight: 500;
}

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

.modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    padding: 1.5rem;
    margin: 0 -1.5rem -1.5rem;
    display: flex;
    gap: 15px;
    border-top: 1px solid var(--border);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-light);
    padding: 0 10px;
    border-radius: 12px;
}

.btn-qty {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 10px;
}

#product-qty {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Skeletons */
.category-skeleton {
    width: 80px;
    height: 35px;
    background: var(--border);
    border-radius: 100px;
    animation: skeleton-pulse 1.5s infinite;
}

.product-card-skeleton {
    height: 120px;
    background: var(--bg-white);
    border-radius: 20px;
    margin-bottom: 1rem;
    animation: skeleton-pulse 1.5s infinite;
}

@keyframes skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}
/* Cart Modal Styles */
.modal-cart-content {
    background: var(--bg-white);
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

.btn-back {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item-render {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cart-item-details {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cart-item-price {
    font-weight: 700;
}

.cart-summary {
    padding: 1.5rem;
    background: var(--bg-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.summary-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 1.1rem;
    font-weight: 800;
}

.cart-checkout-section {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-group-client {
    margin-bottom: 1rem;
}

.form-group-client label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.form-group-client input, .form-group-client textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-light);
    outline: none;
}

.btn-send-whatsapp {
    width: 100%;
    padding: 1.2rem;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Modal Identificação */
#modal-id {
    display: none;
    align-items: center;
    justify-content: center;
}

#modal-id .modal-client {
    background: var(--bg-white);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    z-index: 150;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.nav-item i {
    width: 24px;
    height: 24px;
}

.nav-item.active {
    color: var(--primary);
}

/* My Orders Client */
.orders-header-client {
    margin-bottom: 2rem;
}

.orders-header-client h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

.order-card-client {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.order-client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border);
}

.order-client-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-novo { background: rgba(255, 107, 0, 0.1); color: var(--primary); }
.status-pendente { background: rgba(255, 107, 0, 0.1); color: var(--primary); }
.status-a-caminho { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.status-finalizado { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-recusado { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.order-client-items {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.order-client-total {
    margin-top: 1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
}
