:root {
    /* Clásicos del Chamo pero modernizados */
    --primary: #d63031;
    /* Rojo intenso */
    --primary-dark: #b71c1c;
    --accent: #fbc531;
    /* Amarillo dorado */
    --success: #00b894;
    /* Verde moderno */
    --dark: #2d3436;
    /* Negro suave */
    --light: #f5f6fa;
    /* Blanco humo */
    --gray: #b2bec3;

    /* Efectos */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.95);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Z-Index Layers */
    --z-back: -1;
    --z-normal: 1;
    --z-modal: 1000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #242d35;
    /* Color neutro suave */
    color: var(--dark);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* --- SEARCH BAR --- */
.search-container {
    margin: 20px auto;
    max-width: 600px;
    position: relative;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    /* Espacio para icono */
    border-radius: 50px;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat 15px center;
    transition: var(--transition);
}

#searchInput:focus {
    border-color: var(--accent);
    box-shadow: 0 8px 25px rgba(251, 197, 49, 0.2);
    outline: none;
}

/* --- LAYOUT --- */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* --- HEADER --- */
.main-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.logo-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    position: relative;
    border-radius: 50%;
    background: white;
    padding: 5px;
    box-shadow: 0 0 20px rgba(251, 197, 49, 0.5);
    /* Resplandor amarillo */
}

.logo-header {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.header-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    color: var(--light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
}

/* --- LOGIN / CARD STYLES --- */
.card {
    background: var(--glass);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.login-section h2 {
    color: var(--primary);
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-intro {
    text-align: center;
    color: #636e72;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 197, 49, 0.2);
}

/* --- MENÚ --- */
.menu-section {
    position: relative;
    z-index: var(--z-normal);
}

/* .menu-bg-decor eliminates per user request */

.welcome-banner {
    background: var(--glass);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

.highlight-text {
    color: var(--primary);
    font-weight: 800;
}

.category-title {
    font-family: 'Outfit', sans-serif;
    color: var(--light);
    font-size: 2rem;
    margin: 40px 0 20px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    padding-bottom: 5px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* --- ITEMS DEL MENÚ --- */
.menu-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.item-content h4 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.flex-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.price-pill {
    background: #e3f2fd;
    color: #0984e3;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.description {
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Selectores de tamaño */
.size-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.size-opt {
    flex: 1;
    text-align: center;
    padding: 8px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.size-opt small {
    display: block;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
}

.size-opt:hover {
    border-color: var(--accent);
}

.size-opt.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--dark);
}

.size-opt.selected small {
    color: var(--dark);
}

/* --- EXTRAS --- */
.extra-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.extra-item:hover {
    background: white;
    border-color: #ffeaa7;
}

.extra-item input {
    display: none;
}

/* Custom Checkbox */
.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    position: relative;
    transition: var(--transition);
}

.extra-item input:checked+.checkmark {
    background: var(--success);
    border-color: var(--success);
}

.extra-item input:checked+.checkmark::after {
    content: '✔';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* --- BOTONES --- */
.btn-primary,
.btn-add {
    background: linear-gradient(45deg, var(--primary) 0%, #ff4757 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(214, 48, 49, 0.4);
    text-transform: uppercase;
    width: 100%;
}

.btn-add {
    padding: 12px;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover,
.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 48, 49, 0.6);
}

.btn-add:active {
    transform: scale(0.95);
}

/* --- CARRITO FLOTANTE --- */
.cart-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: var(--transition);
    border: 4px solid white;
}

.cart-btn:hover {
    transform: scale(1.1) rotate(-10deg);
}

.cart-btn .icon {
    font-size: 30px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid white;
}

/* --- MODAL --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Mobile bottom sheet style */
    z-index: 200;
}

@media (min-width: 768px) {
    .modal {
        align-items: center;
    }
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px 24px 0 0;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
}

@media (min-width: 768px) {
    .modal-content {
        border-radius: 24px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

#totalDisplay {
    text-align: right;
    font-size: 1.5rem;
    color: var(--success);
    margin-bottom: 15px;
    font-family: 'Outfit', sans-serif;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    flex: 1;
    background: #dfe6e9;
    color: var(--dark);
    border: none;
    border-radius: 50px;
    padding: 15px;
    cursor: pointer;
    font-weight: 600;
}

/* --- ANIMACIONES --- */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.animate-up {
    animation: slideUp 0.6s ease-out;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 600px) {
    .header-text h1 {
        font-size: 2rem;
    }

    .card {
        padding: 25px;
    }

    .btn-add {
        padding: 15px;
    }
}