/* ========================================
   HAMBURGUESAS CHÁVELO32 - ESTILOS PRINCIPALES
   Tema: Premium Burger Dark Mobile-First
   ======================================== */

/* Variables CSS - Paleta Chávelo32 */
:root {
    --primary-orange: #e65100;
    --primary-orange-light: #ff6d00;
    --primary-orange-dark: #bf360c;
    --accent-gold: #ffc107;
    --accent-gold-light: #ffd54f;
    --bg-black: #0a0a0a;
    --bg-dark: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --text-white: #ffffff;
    --text-gray: #b8b8b8;
    --text-light-gray: #888888;
    --success-green: #25d366;
    --warning-red: #e53935;
    --shadow-orange: rgba(230, 81, 0, 0.3);
    --shadow-gold: rgba(255, 193, 7, 0.2);
    --gradient-orange: linear-gradient(135deg, #e65100 0%, #ff6d00 50%, #e65100 100%);
    --gradient-fire: linear-gradient(135deg, #bf360c 0%, #e65100 30%, #ff6d00 70%, #ffc107 100%);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* ========================================
   WELCOME SCREEN
   ======================================== */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0800 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
    text-align: center;
}

.welcome-content {
    max-width: 400px;
    width: 100%;
    animation: welcomeFadeIn 1s ease;
}

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

.welcome-badge {
    display: inline-block;
    background: rgba(230, 81, 0, 0.15);
    border: 1px solid rgba(230, 81, 0, 0.4);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent-gold);
    margin-bottom: 25px;
}

.welcome-icon {
    font-size: 5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 30px rgba(230, 81, 0, 0.4));
    animation: welcomePulse 2s ease-in-out infinite;
}

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

.welcome-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    color: var(--text-white);
    margin-bottom: 15px;
}

.welcome-title span {
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3.5rem;
}

.welcome-tagline {
    font-size: 0.85rem;
    color: var(--text-gray);
    letter-spacing: 0.05em;
    margin-bottom: 25px;
}

.welcome-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.welcome-divider span {
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(230, 81, 0, 0.5), transparent);
}

.welcome-divider i {
    color: var(--primary-orange);
    font-size: 1rem;
}

.welcome-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 35px;
}

.welcome-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.welcome-info-item i {
    color: var(--primary-orange);
    width: 18px;
    text-align: center;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--gradient-orange);
    color: var(--text-white);
    border: none;
    padding: 18px 45px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px var(--shadow-orange);
    font-family: 'Montserrat', sans-serif;
}

.welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px var(--shadow-orange);
}

.welcome-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   APP HEADER
   ======================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(230, 81, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-emoji {
    font-size: 1.8rem;
}

.header-brand h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    background: var(--gradient-fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.header-brand p {
    font-size: 0.65rem;
    color: var(--text-light-gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.order-counter-badge {
    background: rgba(230, 81, 0, 0.1);
    border: 1px solid rgba(230, 81, 0, 0.3);
    padding: 6px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-counter-badge .counter-label {
    font-size: 0.65rem;
    color: var(--text-light-gray);
}

.order-counter-badge .counter-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-orange);
    font-family: 'Montserrat', monospace;
}

/* ========================================
   MENU CONTAINER
   ======================================== */
.menu-container {
    padding: 10px 15px 120px;
    max-width: 900px;
    margin: 0 auto;
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.menu-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 5px 15px;
}

.section-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(230, 81, 0, 0.1);
    border: 1px solid rgba(230, 81, 0, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-white);
    line-height: 1;
}

.section-header p {
    font-size: 0.75rem;
    color: var(--text-light-gray);
    margin-top: 3px;
}

/* ========================================
   MENU GRID
   ======================================== */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* ========================================
   MENU ITEM CARD
   ======================================== */
.menu-item {
    background: var(--bg-card);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.menu-item:hover {
    border-color: rgba(230, 81, 0, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item.selected {
    border-color: var(--primary-orange);
    box-shadow: 0 0 25px var(--shadow-orange);
}

.menu-item.added {
    animation: itemAdded 0.3s ease;
}

@keyframes itemAdded {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 30px var(--shadow-orange); }
    100% { transform: scale(1); }
}

/* Item Badge */
.item-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.item-badge.premium {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
    color: #1a1a1a;
}

.item-badge.chef {
    background: linear-gradient(135deg, #e65100, #ff6d00);
    color: white;
}

.item-badge.signature {
    background: linear-gradient(135deg, #4a148c, #7c43bd);
    color: white;
}

.item-badge.popular {
    background: linear-gradient(135deg, #1b5e20, #43a047);
    color: white;
}

.item-badge.bestseller {
    background: linear-gradient(135deg, #e53935, #ff5252);
    color: white;
}

.item-badge.hot {
    background: linear-gradient(135deg, #d50000, #ff1744);
    color: white;
}

/* Item Image */
.item-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.item-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
    pointer-events: none;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-item:hover .item-image img {
    transform: scale(1.05);
}

/* Item Info */
.item-info {
    padding: 15px 18px 18px;
}

.item-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.item-desc {
    font-size: 0.78rem;
    color: var(--text-light-gray);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--accent-gold);
    letter-spacing: 0.03em;
}

/* Item Actions (Quantity Buttons) */
.item-actions {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.btn-decrease,
.btn-increase {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-decrease:hover,
.btn-increase:hover {
    background: rgba(230, 81, 0, 0.2);
}

.btn-increase:active {
    background: var(--primary-orange);
}

.item-quantity {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
    color: var(--text-white);
}

.menu-item.selected .item-quantity {
    color: var(--accent-gold);
}

.menu-item.selected .item-actions {
    border-color: var(--primary-orange);
    background: rgba(230, 81, 0, 0.1);
}

/* ========================================
   REVIEW BAR (Bottom Fixed)
   ======================================== */
.review-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 20px;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(10, 10, 10, 0.98) 80%, transparent);

    /* Hidden by default - transitions for smooth reveal */
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                visibility 0s linear 0.4s;
}

.review-bar.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s ease,
                visibility 0s linear 0s;
}

.review-btn {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-orange);
    color: var(--text-white);
    border: none;
    padding: 18px 25px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px var(--shadow-orange), 0 0 60px rgba(230, 81, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
}

.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px var(--shadow-orange);
}

.review-btn-left,
.review-btn-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.total-price {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

/* ========================================
   MODAL (Order / Success)
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 25px 25px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--primary-orange);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--primary-orange);
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.modal-close:hover {
    background: var(--primary-orange);
}

.modal-body {
    padding: 20px 25px 30px;
    overflow-y: auto;
    flex: 1;
}

/* Order Items in Modal */
.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

.order-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.order-item-price-unit {
    font-size: 0.75rem;
    color: var(--text-light-gray);
}

.order-item-controls {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.order-qty-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.order-qty-btn:hover {
    background: rgba(230, 81, 0, 0.2);
}

.order-qty-btn.increase:active {
    background: var(--primary-orange);
}

.order-item-qty {
    font-weight: 700;
    min-width: 25px;
    text-align: center;
    font-size: 0.9rem;
}

.order-item-subtotal {
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 0.95rem;
    min-width: 60px;
    text-align: right;
}

/* Empty Order */
.empty-order {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light-gray);
}

.empty-order i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-order p {
    font-size: 0.95rem;
}

/* Order Total */
.order-total-section {
    background: rgba(230, 81, 0, 0.08);
    border: 1px solid rgba(230, 81, 0, 0.2);
    border-radius: 15px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
}

.order-total-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-gold);
    letter-spacing: 0.03em;
}

/* Customer Section */
.customer-section {
    margin-bottom: 20px;
}

.customer-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.customer-section label i {
    color: var(--primary-orange);
}

.customer-section input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 18px;
    font-size: 1rem;
    color: var(--text-white);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.customer-section input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 20px var(--shadow-orange);
}

.customer-section input::placeholder {
    color: var(--text-light-gray);
}

/* Send Order Button */
.send-order-btn {
    width: 100%;
    background: var(--success-green);
    color: var(--text-white);
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.3);
    font-family: 'Montserrat', sans-serif;
}

.send-order-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.4);
}

.send-order-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.send-order-btn i {
    font-size: 1.3rem;
}

/* Success Modal */
.success-modal {
    text-align: center;
    padding: 40px 30px;
    border-radius: 25px !important;
    max-width: 400px;
    border-top: none !important;
    position: relative;
    top: auto;
    align-self: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-white);
}

.success-modal p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.success-subtitle {
    font-size: 0.85rem !important;
    color: var(--text-light-gray) !important;
    margin-bottom: 25px !important;
}

.success-close-btn {
    background: var(--gradient-orange);
    color: var(--text-white);
    border: none;
    padding: 15px 40px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px var(--shadow-orange);
    font-family: 'Montserrat', sans-serif;
}

.success-close-btn:hover {
    transform: translateY(-2px);
}

/* ========================================
   FOOTER
   ======================================== */
.app-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 80px;
}

.footer-brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--primary-orange);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.app-footer p {
    font-size: 0.8rem;
    color: var(--text-light-gray);
    margin-bottom: 5px;
}

.footer-hours {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-hours i {
    color: var(--primary-orange);
}

.footer-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-light-gray);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.footer-admin-link:hover {
    background: rgba(230, 81, 0, 0.1);
    border-color: rgba(230, 81, 0, 0.3);
    color: var(--primary-orange);
}

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

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange-light);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (min-width: 600px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        align-items: center;
        padding: 20px;
    }

    .modal-content {
        border-radius: 25px;
        max-height: 85vh;
    }

    .success-modal {
        border-radius: 25px !important;
    }
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 900px) {
    .menu-container {
        padding: 20px 30px 120px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .item-image {
        height: 200px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }
}

@media (min-width: 1200px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
