/* =====================================================
   Cafe Macis - Estilos del Menu Interactivo
   ===================================================== */

.menu-page {
    padding-top: 80px;
    padding-bottom: 100px;
    min-height: 100vh;
    background-color: var(--secondary);
}

/* Banner de promocion */
.promo-banner {
    background: linear-gradient(135deg, rgba(139,45,45,0.92), rgba(92,58,30,0.92)),
                url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?w=1200&q=60') center/cover no-repeat;
    color: var(--white);
    text-align: center;
    padding: 22px 20px;
    animation: fadeInDown 0.5s ease;
}

.promo-banner .promo-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.promo-banner .promo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.promo-banner .promo-detail {
    font-size: 0.85rem;
    opacity: 0.9;
}

.promo-banner i {
    margin-right: 6px;
}

/* Navegacion de categorias */
.category-nav {
    position: sticky;
    top: 70px;
    z-index: 99;
    background-color: var(--secondary);
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: top 0.3s;
}


.category-pills {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

.category-pill {
    flex-shrink: 0;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
}

/* Seccion de categoria */
.menu-category {
    margin-bottom: 30px;
}

.menu-category-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    padding: 30px 25px;
    margin-bottom: 5px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(92,58,30,0.85), rgba(62,42,20,0.8)),
                url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=800&q=60') center/cover no-repeat;
}

/* Imagenes de fondo por categoria */
.menu-category-header[data-cat="desayunos"] {
    background: linear-gradient(135deg, rgba(139,45,45,0.82), rgba(92,58,30,0.8)),
                url('https://images.unsplash.com/photo-1533089860892-a7c6f0a88666?w=800&q=60') center/cover no-repeat;
}

.menu-category-header[data-cat="comidas"] {
    background: linear-gradient(135deg, rgba(92,58,30,0.82), rgba(62,42,20,0.8)),
                url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?w=800&q=60') center/cover no-repeat;
}

.menu-category-header[data-cat="bebidas"] {
    background: linear-gradient(135deg, rgba(62,42,20,0.85), rgba(92,58,30,0.82)),
                url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?w=800&q=60') center/cover no-repeat;
}

.menu-category-header[data-cat="ensaladas"] {
    background: linear-gradient(135deg, rgba(74,107,42,0.82), rgba(58,85,32,0.8)),
                url('https://images.unsplash.com/photo-1512621776951-a57141f2eefd?w=800&q=60') center/cover no-repeat;
}

.menu-category-header .cat-subtitle {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.85;
    margin-top: 4px;
}

.menu-category-header i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Item del menu */
.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background-color 0.2s;
}

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

.menu-item.selected {
    background-color: rgba(74,107,42,0.06);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
    margin: 0 -10px;
}

.menu-item-info {
    flex: 1;
    min-width: 0;
}

.menu-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.3;
}

.menu-item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.menu-item-price {
    font-weight: 700;
    color: var(--accent-red);
    font-size: 1rem;
    white-space: nowrap;
    margin: 0 12px;
}

/* Controles de cantidad */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

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

.qty-btn.btn-add {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.qty-btn.btn-add:hover {
    background-color: var(--accent-green);
    color: var(--white);
}

.qty-value {
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}

/* ---- Ensalada Builder ---- */
.ensalada-builder {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--accent-green);
}

.ensalada-builder h3 {
    color: var(--accent-green);
    font-size: 1.4rem;
}

.ensalada-size-option {
    background: var(--secondary-alt);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    text-align: center;
}

.ensalada-size-option:hover {
    border-color: var(--accent-green);
}

.ensalada-size-option.selected {
    border-color: var(--accent-green);
    background: rgba(74,107,42,0.08);
}

.ensalada-size-option .size-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-green);
}

.ensalada-size-option .size-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-red);
}

.ensalada-size-option .size-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.option-group {
    margin-bottom: 20px;
}

.option-group-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(74,107,42,0.2);
}

.option-group-counter {
    float: right;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.option-group-counter.complete {
    color: var(--accent-green);
}

.option-checkbox {
    display: inline-flex;
    align-items: center;
    margin: 4px 6px 4px 0;
    padding: 8px 14px;
    background: var(--secondary-alt);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    border: 2px solid transparent;
    user-select: none;
}

.option-checkbox:hover {
    border-color: var(--accent-green);
}

.option-checkbox.checked {
    background-color: var(--accent-green);
    color: var(--white);
    border-color: var(--accent-green);
}

.option-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.option-checkbox i {
    margin-right: 5px;
    font-size: 0.8rem;
}

.btn-agregar-ensalada {
    background-color: var(--accent-green);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s;
}

.btn-agregar-ensalada:hover:not(:disabled) {
    background-color: #3a5520;
    color: var(--white);
}

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

/* ---- Barra inferior de pedido ---- */
.order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    padding: 0;
    z-index: 1000;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.order-bar.visible {
    transform: translateY(0);
}

.order-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    cursor: pointer;
}

.order-bar-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.order-bar-count {
    background: var(--accent-red);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.order-bar-total {
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-enviar-pedido {
    background-color: var(--whatsapp);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-enviar-pedido:hover {
    background-color: #1da851;
    color: var(--white);
}

/* ---- Modal de confirmacion ---- */
.order-modal .modal-header {
    background-color: var(--primary);
    color: var(--white);
    border-radius: 0;
}

.order-modal .modal-title {
    font-family: 'Playfair Display', serif;
}

.order-modal .close {
    color: var(--white);
    opacity: 0.8;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 0.9rem;
}

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

.order-summary-item .item-qty {
    color: var(--accent-green);
    font-weight: 700;
    margin-right: 5px;
}

.order-summary-item .item-price {
    font-weight: 700;
    color: var(--accent-red);
    white-space: nowrap;
}

.order-summary-ensalada-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-left: 20px;
    margin-top: 2px;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1.15rem;
    font-weight: 700;
    border-top: 2px solid var(--primary);
    margin-top: 10px;
}

.order-summary-discount {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: var(--accent-green);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-confirm-order {
    background-color: var(--whatsapp);
    color: var(--white);
    border: none;
    border-radius: 30px;
    padding: 14px;
    font-weight: 700;
    font-size: 1.05rem;
    width: 100%;
    transition: all 0.3s;
}

.btn-confirm-order:hover {
    background-color: #1da851;
    color: var(--white);
}

.btn-confirm-order i {
    margin-right: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .menu-page {
        padding-top: 70px;
    }

    .menu-item {
        padding: 12px 0;
    }

    .menu-item-name {
        font-size: 0.9rem;
    }

    .menu-item-price {
        font-size: 0.95rem;
        margin: 0 8px;
    }

    .qty-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .qty-value {
        width: 28px;
        font-size: 0.9rem;
    }

    .ensalada-builder {
        padding: 18px;
    }

    .option-checkbox {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .order-bar-content {
        padding: 10px 15px;
    }

    .btn-enviar-pedido {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 575px) {
    .category-pill {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .menu-category-header {
        font-size: 1.3rem;
        padding: 22px 18px;
    }

    .promo-banner {
        padding: 18px 15px;
    }

    .promo-banner .promo-text {
        font-size: 1.1rem;
    }

    .ensalada-size-option {
        padding: 12px;
    }

    .ensalada-size-option .size-name {
        font-size: 1rem;
    }
}
